ShellCheck: A Second Pair of Eyes

ShellCheck reads a script without running it and points out likely mistakes, each with its line, a code such as SC2086 and a plain message; the codes worth knowing are an unquoted variable, a cd that might fail and a loop over ls, and a disable comment silences one warning on purpose.

Updated

Cheat sheet for the lesson ShellCheck: A Second Pair of Eyes: ShellCheck reads a script without running it and points out likely mistakes, each with its line, a code such as SC2086 and a plain message; the codes worth knowing are an unquoted variable, a cd that might fail and a loop over ls, and a…
Category
Bash
Level
Journeyman
Tags
glob, Linter, linux, quoting, shellcheck, unix