TIL about https://www.shellcheck.net, an open-source tool that can find bugs in your shellscripts!
… it certainly finds bugs in *my* shellscripts. /o\ #bangbangcon
TIL about https://www.shellcheck.net, an open-source tool that can find bugs in your shellscripts!
… it certainly finds bugs in *my* shellscripts. /o\ #bangbangcon
@blinry check out shellharden too!
Spellcheck is "written in Haskell, if you're into that sort of thing."
Another similar tool is Hadolint at
https://github.com/hadolint/hadolint
"Dockerfile linter, validate inline bash, written in Haskell"
Linters are great especially when you use them at the start of a project!
I always use shellcheck as well, and I spend the time saved finding more subtle problems.
@blinry might as well admit I'm going to keep writing .sh ...
# This is bash. Be safe out there.
set -e
set -u
@blinry we use this in our Terraform and Ansible build pipelines at work.
Intellij also recommends when you open a file with a shell script File Type (either by extension or hash bang.)
Very useful tool.
love this!