]> sipb.mit.edu Git - wiki.git/commitdiff
Link to ShellCheck
authorAnders Kaseorg <andersk@mit.edu>
Sat, 1 Feb 2020 22:52:39 +0000 (17:52 -0500)
committersipb-www <sipb-www@shining-armor.mit.edu>
Sat, 1 Feb 2020 22:52:39 +0000 (17:52 -0500)
doc/safe-shell.mdwn

index 56e549b18c052dfa3bc03a985c17176630a1ce23..4b6efbd590e61c57ce2c08391fd881451bfd89b4 100644 (file)
@@ -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.