X-Git-Url: https://sipb.mit.edu/gitweb.cgi/wiki.git/blobdiff_plain/94ede14e754ea69c37e7cc906d386652b30e7979..9185af99efc1a6c03de05cf61ef332af9a846cb6:/doc/safe-shell.mdwn diff --git a/doc/safe-shell.mdwn b/doc/safe-shell.mdwn index 56e549b..4b6efbd 100644 --- a/doc/safe-shell.mdwn +++ b/doc/safe-shell.mdwn @@ -112,6 +112,10 @@ Another approach is to prefix each filename with `./`, if the filenames are expe TODO: mumble `mktemp`? +## Use [ShellCheck](https://www.shellcheck.net/) to check for bugs + +The [ShellCheck](https://www.shellcheck.net/) linter automatically catches a number of the above mistakes and more. Run it regularly, ideally with integration into your editor and your test suite, and address all of its diagnostics. Even warnings that might sound unimportant could be obscuring important bugs. + ## Other resources Google has a [Shell Style Guide](https://google.github.io/styleguide/shell.xml). As the name suggests, it primarily focuses on good style, but some items are safety/security-relevant.