Re:Become Shell Literate
by spicyramen on Saturday December 12, 2020 @02:23PM
(#25400735)
Our codebase uses tons of shellscripts and Python. Shell has been great for running installations tasks. Recently we added presubmits and added shellcheck utility to check for style and syntax. Any suggestions for adding unit tests for she'll scripts will be great. I'm planning to unify the syntax across the board
[ Parent
| on HN ]
Bet you £10 if you try your code from a path containing spaces it doesn't work.
I love shellcheck. There's no great reason not to have any new shellcheck errors commented on each pull request. It's almost always right and how much you as the developer cares is the big question.
Are you using shell for installations, or make? I would think builds/installs/tests are more easily done via make, as opposed to a self-made shell implementation.
Try shellspec for tests. https://shellspec.info/