shellcheck add more detail to README.md
authorAJ ONeal <aj@therootcompany.com>
Fri, 9 Apr 2021 18:15:48 +0000 (18:15 +0000)
committerAJ ONeal <aj@therootcompany.com>
Fri, 9 Apr 2021 18:19:24 +0000 (18:19 +0000)
shellcheck/README.md

index 98e2d17048913e055779b7f9e8484d31c524ee11..8733f63ad498317818a2c47aafff315cf2bfee76 100644 (file)
@@ -12,30 +12,53 @@ specific version.
 
 > shellcheck catches rookie mistakes (and old-habits-die-hard mistakes) in bash
 
-### Run shellcheck in your terminal:
+Also recommended by Google's
+[Shell Style Guide](https://google.github.io/styleguide/shellguide.html)
+
+### How to run shellcheck from the CLI
 
 ```bash
-shellcheck yourscript
+shellcheck ./script.sh
 ```
 
-<!---
-### Run shellcheck in your editor:
+### How to run shellcheck in vim
+
+`shellcheck` is
+[supported by `vim-ale`](https://github.com/dense-analysis/ale/blob/master/supported-tools.md)
+out-of-the-box™.
+
+Just [install `vim-ale`](https://webinstall.dev/vim-ale) and `shellcheck` and
+you're good to go.
 
-Include running shellcheck in editor?
+### How to run shellcheck in VS Code
 
-It's just links to other linters or extensions
--->
+See
+[Visual Studio Marketplace: ShellCheck](https://marketplace.visualstudio.com/items?itemName=timonwong.shellcheck).
 
 ### To use shellcheck in a build or test suite:
 
 Simply include shellcheck in the process.
 
-```bash
+```yaml
 check-scripts:
-    # Fail if any of these files have warnings
-    shellcheck myscripts/*.sh
+  # Fail if any of these files have warnings
+  shellcheck myscripts/*.sh
+```
+
+### How to ignore an error
+
+You can ignore an error by putting a comment with the `SCXXXX` error code above
+it:
+
+```bash
+# shellcheck disable=<code>
+```
+
+```bash
+# shellcheck disable=SC1004
+NOT_AN_ERROR='Look, a literal \
+inside of a string!'
 ```
 
-<!---
-Improve this as you need to!
--->
+Complete list of `SCXXXX` error codes:
+<https://gist.github.com/nicerobot/53cee11ee0abbdc997661e65b348f375>