ShellCheck directive

A comment such as # shellcheck disable=SC2086 that tells ShellCheck to skip one finding on the next line.

In more detail

Use it only when the code is deliberately doing what ShellCheck warns about, and write the reason on the same line. Disabling a whole file hides real bugs later.

Example

# shellcheck disable=SC2086  # flags must split into two options

Related terms

Taught in

References