3 ms·
I used it for a big project about two years ago, and between it and Shellcheck I had pretty good time maintaining a relatively large Bash codebase (we're talkin
by andrewl-hn 7y ago
I used it for a big project about two years ago, and between it and Shellcheck I had pretty good time maintaining a relatively large Bash codebase (we're talking tens of thousands of lines of code across several distinct components).
Initially I was skeptical, and tried using Node and Mocha for writing tests instead, but calling shell from other languages is pretty cumbersome, and at some point that became very annoying. I gave Bats a try and was pleasantly surprised.
Once one gets used to it Shell is a really good language if the large chunk of your work is calling out external processes and passing the outputs between them. Sure, some language design choices of Shell are arcane and subpar, but with tools like Bats and Shellcheck it's possible to reach comparable levels of developer ergonomics that we all got used to with more popular languages.
- kohtatsu 7y agoBless you <3 Lots of bash hate on HN today. Shellcheck is the training wheels bash deserves, if you're learning it's indispensable just to harass you for quoting. https://shellcheck.net/ https://shellcheck.net/