4 ms·
If you’re interested in writing safe shell scripts then check out shellcheck: https://github.com/koalaman/shellcheck https://github.com/koalaman/shellcheck If
by alblue 6y ago
If you’re interested in writing safe shell scripts then check out shellcheck:
https://github.com/koalaman/shellcheck https://github.com/koalaman/shellcheck
If you’re interested I’ve written a git hook for it that runs a check when you git commit:
https://github.com/alblue/scripts/blob/main/shellcheck-pre-commit https://github.com/alblue/scripts/blob/main/shellcheck-pre-c...
You should also check out her Google shell script style guide:
https://google.github.io/styleguide/shellguide.html https://google.github.io/styleguide/shellguide.html
- woudsma 6y agoShellcheck and the VS Code Shellcheck extension[1] are really good. I never write a bash script without it. Built-in autofixes and direct links to extensive documentation on each rule, with easy to grasp examples. It's just awesome. [1]: https://marketplace.visualstudio.com/items?itemName=timonwong.shellcheck https://marketplace.visualstudio.com/items?itemName=timonwon...
- pabs3 6y agoAn earlier comment of mine about some more shell checking/linting/formatting tools: https://news.ycombinator.com/item?id=26510549 https://news.ycombinator.com/item?id=26510549