• ShellCheck directives are only valid in front of complete compound commands, like if, not e.g. individual elif branches.
  • Problematic code:
  • Correct code:
  • Rationale:
  • Exceptions: