[–] npongratz 11y ago ↗ See also the version you can compile yourself and run in the terminal, written in Haskell:https://github.com/koalaman/shellcheck
[–] SixSigma 11y ago ↗ Why don't you call it what it is? bash / sh checker rather than shellcheck. Or do you plan to add other shells?Ksh, csh, rc, tsh - not everyone uses bash. [–] xeroxmalf 11y ago ↗ Their about page[0] says "ShellCheck is a static analysis and linting tool for sh/bash scripts."[0]http://www.shellcheck.net/about.html [–] pushrax 11y ago ↗ It's pretty clearly a play on words... [–] SixSigma 11y ago ↗ I don't get it, what's it playing on? [–] Alupis 11y ago ↗ idk if it's a play on something -- but all of the things you mentioned above are still called a "shell", even if it's not the standard "sh" shell.and, from parts of the source code, it appears it may work with ksh, zsh, etc. (i don't have a sample handy to try though). [–] SixSigma 11y ago ↗ not for me, I use rc [–] npongratz 11y ago ↗ Its name might be a play on "spellcheck". When I first read it quickly, my eyes bounced over the "h" and my brain filled in a "p".Personally, I enjoy cleverness like this. [–] Alupis 11y ago ↗ From the source code:https://github.com/koalaman/shellcheck/blob/master/ShellChec...shellForExecutable "sh" = return ShshellForExecutable "ash" = return ShshellForExecutable "dash" = return ShshellForExecutable "ksh" = return KshshellForExecutable "ksh88" = return KshshellForExecutable "ksh93" = return KshshellForExecutable "zsh" = return ZshshellForExecutable "bash" = return BashshellForExecutable _ = Nothing
[–] xeroxmalf 11y ago ↗ Their about page[0] says "ShellCheck is a static analysis and linting tool for sh/bash scripts."[0]http://www.shellcheck.net/about.html
[–] pushrax 11y ago ↗ It's pretty clearly a play on words... [–] SixSigma 11y ago ↗ I don't get it, what's it playing on? [–] Alupis 11y ago ↗ idk if it's a play on something -- but all of the things you mentioned above are still called a "shell", even if it's not the standard "sh" shell.and, from parts of the source code, it appears it may work with ksh, zsh, etc. (i don't have a sample handy to try though). [–] SixSigma 11y ago ↗ not for me, I use rc [–] npongratz 11y ago ↗ Its name might be a play on "spellcheck". When I first read it quickly, my eyes bounced over the "h" and my brain filled in a "p".Personally, I enjoy cleverness like this.
[–] SixSigma 11y ago ↗ I don't get it, what's it playing on? [–] Alupis 11y ago ↗ idk if it's a play on something -- but all of the things you mentioned above are still called a "shell", even if it's not the standard "sh" shell.and, from parts of the source code, it appears it may work with ksh, zsh, etc. (i don't have a sample handy to try though). [–] SixSigma 11y ago ↗ not for me, I use rc [–] npongratz 11y ago ↗ Its name might be a play on "spellcheck". When I first read it quickly, my eyes bounced over the "h" and my brain filled in a "p".Personally, I enjoy cleverness like this.
[–] Alupis 11y ago ↗ idk if it's a play on something -- but all of the things you mentioned above are still called a "shell", even if it's not the standard "sh" shell.and, from parts of the source code, it appears it may work with ksh, zsh, etc. (i don't have a sample handy to try though). [–] SixSigma 11y ago ↗ not for me, I use rc
[–] npongratz 11y ago ↗ Its name might be a play on "spellcheck". When I first read it quickly, my eyes bounced over the "h" and my brain filled in a "p".Personally, I enjoy cleverness like this.
[–] Alupis 11y ago ↗ From the source code:https://github.com/koalaman/shellcheck/blob/master/ShellChec...shellForExecutable "sh" = return ShshellForExecutable "ash" = return ShshellForExecutable "dash" = return ShshellForExecutable "ksh" = return KshshellForExecutable "ksh88" = return KshshellForExecutable "ksh93" = return KshshellForExecutable "zsh" = return ZshshellForExecutable "bash" = return BashshellForExecutable _ = Nothing
[–] odc 11y ago ↗ Does it work better than bash -n? [–] Alupis 11y ago ↗ The messages it gives are far more descriptive than bash -n. Plus it includes links so you can learn more about why it's a possible problem.
[–] Alupis 11y ago ↗ The messages it gives are far more descriptive than bash -n. Plus it includes links so you can learn more about why it's a possible problem.
[–] Alupis 11y ago ↗ This is definitely helpful. At the very least for showing things that may get interpreted wrong (well, right, but wrong from the intention) in scripts.
[–] pit 11y ago ↗ Finally, something to do with all those install scripts that pipe the output of curl to bash!
[–] nidx 11y ago ↗ I was rewriting a bunch of custom scrips a few months ago and would have been lost without this tool finding my mistakes.
14 comments
[ 2.9 ms ] story [ 47.2 ms ] threadhttps://github.com/koalaman/shellcheck
Ksh, csh, rc, tsh - not everyone uses bash.
[0]http://www.shellcheck.net/about.html
and, from parts of the source code, it appears it may work with ksh, zsh, etc. (i don't have a sample handy to try though).
Personally, I enjoy cleverness like this.
https://github.com/koalaman/shellcheck/blob/master/ShellChec...
shellForExecutable "sh" = return Sh
shellForExecutable "ash" = return Sh
shellForExecutable "dash" = return Sh
shellForExecutable "ksh" = return Ksh
shellForExecutable "ksh88" = return Ksh
shellForExecutable "ksh93" = return Ksh
shellForExecutable "zsh" = return Zsh
shellForExecutable "bash" = return Bash
shellForExecutable _ = Nothing