News for hackers. Stuff that matters.
Re:Ask HN: Can I see your scripts? by scottLobster on Monday August 15, 2022 @09:53AM (#32469702)
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/

Re:Ask HN: Can I see your scripts? by bashonly on Monday August 15, 2022 @10:20AM (#32469998)
shellcheck is so good it's even worth installing the 100+ required haskell libraries
Re:Ask HN: Can I see your scripts? by justin_oaks on Monday August 15, 2022 @11:58AM (#32471351)
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
Re:Ask HN: Can I see your scripts? by rafamaddd on Monday August 15, 2022 @11:34AM (#32471004)
If you're on Arch, you could install `shellcheck-bin` from the AUR.
Re:Ask HN: Can I see your scripts? by abdusco on Monday August 15, 2022 @12:52PM (#32472131)
Jetbrains IDEs have a plugin called `Shell Script` that provides code assistance and warnings. It's also compatible with shellcheck too.