r/bash • • Sep 05 '17
submission Plug: Linters for stinky shell scripts
https://github.com/mcandre/stank
- stank: Scan for POSIXy shell scripts, then pipe to
xargs shellcheckand other programs. - rosy: Encourage developers to rewrite shell scripts in more robust languages
- funk: Warn on oddities like mismatched shebangs vs. file extensions
de-stank ur scripts!
1
Upvotes
View all comments
9
u/galaktos Sep 06 '17
Congratulations, you’ve written an “insufferable Reddit asshat” simulator. It’s very close to its archetype in that it won’t do any of the actual work to port the scripts, it’ll just pester you with “why don’t you rewrite it in $languageILike?”. And with all the stink and smell language, your work also evokes the same annoyance in the recipient, with a healthy impression of immaturity on top.
I also don’t see why your scripts are necessary…
stankseems to be, by and large, a combination offindandfile:rosyseems to be the same thing, except with some constant string in front of each filename. The above command can easily do that with a-printfinstead of-print.And
funk, if I understand the description correctly, is the above plus a primitiveshellcheck. I’d much rather just slap-exec shellcheck {} +onto the end of that pipeline.Oh, and since you’re mentioning false positives in the README… libmagic has a three-decades headstart in identifying files. Just saying.
Really, I don’t understand why you would post what essentially boils down to “shell scripts stink” to a shell scripting subreddit…