Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Going to use this opportunity to spam ShellCheck, because it has historically saved me dozens of hours catching many silent Bash scripting errors and just making my scripts more robust/warning me of obscure edge cases:

https://www.shellcheck.net/



shellcheck is so good it's even worth installing the 100+ required haskell libraries


I've always just run it as a docker command. Here's what's listed on the github page [1]:

    docker run --rm -v "$PWD:/mnt" koalaman/shellcheck:stable myscript

[1] https://github.com/koalaman/shellcheck


If you're on Arch, you could install `shellcheck-bin` from the AUR.


Jetbrains IDEs have a plugin called `Shell Script` that provides code assistance and warnings. It's also compatible with shellcheck too.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: