Interview Prep/Shell Scripting/ShellCheck, debugging, testing, portability and security

Name the ShellCheck warnings you see most and what each means.

IntermediateConceptShellCheck, debugging, testing, portability and security
Answer
Code Meaning
SC2086 Double quote to prevent globbing and word splitting
SC2046 Quote this to prevent word splitting (unquoted $(...))
SC2155 Declare and assign separately to avoid masking return values
SC2164 Use cd ... || exit in case cd fails
SC2034 Variable appears unused
SC2181 Check exit code directly with if mycmd;, not $?
SC2068 Double quote array expansions to avoid re-splitting elements
SC2207 Prefer mapfile or read -a to split command output
SC1091 Not following a sourced file (use -x or a source= directive)
SC2016 Expressions don't expand in single quotes
All Shell Scripting questions Roadmap: Shell scripting (Bash)

More on ShellCheck, debugging, testing, portability and security