koalaman/shellcheck
View on GitHub ↗ ★ 40,272 Haskell
ShellCheck, a static analysis tool for shell scripts
100 mentions on Hacker News by 92 people: 15 stories, 85 comments · first 2013-11-18 · latest 2025-12-30
20082026
-
I know enough bash to know a relevant shellcheck rule... Not sure that's enough to use it safely. :) https://github.com/koalaman/shellcheck/wiki/SC2124
comment by AlexCoventry · 2020-01-13 · in Bash $* and $@ (2017) -
…the alternative of doing all the mixing myself and dealing with weird plugins interactions :). [2] https://github.com/koalaman/shellcheck [3] https://jvns.ca/blog/2017/03/26/bash-quirks/
comment by ronjouch · 2019-10-31 · in A Quick and Easy Guide to Tmux (2015) -
…I would just add that you can get great linting / syntax checking with ShellCheck [1] [2] [1] - https://github.com/koalaman/shellcheck [2] - https://www.shellcheck.net/ ShellCheck is in many of the distro package repositories already.
comment by LinuxBender · 2019-09-20 · in Kiss – A Linux distribution with a focus on “less is more” -
…but you can configure ShellCheck to ignore certain errors that you don't care about[1]. [1] https://github.com/koalaman/shellcheck/wiki/Ignore
comment by Splognosticus · 2019-06-22 · in Show HN: Catj – A new way to display JSON files -
…throws an error if the variable is unset or empty. (Still far too scary for my taste, though!) [1] https://github.com/koalaman/shellcheck/wiki/SC2115
comment by jakejarvis · 2019-04-10 · in Simple Bash syntax error in Steam for Linux executed “rm -rf /*” (2015) -
While not an alternative, please bugfix your bash: mv "$@" ~/.Trash/ https://github.com/koalaman/shellcheck/wiki/SC2086
comment by floatingatoll · 2019-03-17 · in Stop Using `rm` in Bash. Use `del` -
Shellcheck[0] is the Haskell program I use the most. [0]: https://github.com/koalaman/shellcheck
comment by spudlyo · 2018-12-28 · in Please do not attempt to simplify this code -
If you do any bash/sh programming, I highly recommend shellcheck: https://github.com/koalaman/shellcheck
comment by hatsubai · 2018-11-19 · in Ask HN: Best Command-Line Applications? -
…you run your shell script through shellcheck [1] source [2] [1] - https://www.shellcheck.net/ [2] - https://github.com/koalaman/shellcheck Shellcheck is also in several yum repos such as EPEL and in homebrew for Mac. You can add a comment…
comment by LinuxBender · 2018-10-02 · in Here's Why You Should Quote Your Variables in Bash -
…"function" from the front. one of the many things I learned by using Shellcheck for static analysis https://github.com/koalaman/shellcheck
comment by lsiebert · 2018-07-05 · in Something about functions in Bash (2017) -
…shellcheck, which will also warn you against doing stupid things. Very useful when debugging. https://github.com/koalaman/shellcheck
comment by chrisfinazzo · 2018-05-15 · in Shell Style Guide -
A straw man question. That's not the problem with which. * https://github.com/koalaman/shellcheck/wiki/SC2230 * https://unix.stackexchange.com/questions/85249/
comment by JdeBP · 2018-05-15 · in Safe ways to do things in bash -
…on why something is wrong and often multiple alternative solutions for each use case (eg: https://github.com/koalaman/shellcheck/wiki/SC2086 ). I learned more bash from Shellcheck than all tutorials and references combined.
comment by aequitas · 2018-05-14 · in Safe ways to do things in bash -
…shell scripts as you code them. It generally makes best practice suggestions including quoting. [1] https://github.com/koalaman/shellcheck [2] https://github.com/SublimeLinter/SublimeLinter-shellcheck
comment by nodesocket · 2018-05-14 · in Safe ways to do things in bash -
…great, for ever problem it detects you get an unique reference which you can lookup on the wiki eg: https://github.com/koalaman/shellcheck/wiki/SC2086 It then not only describes the problem but also shows different ways of solving it with…
comment by aequitas · 2018-01-06 · in Things I Wish I'd Known About Bash -
Does shellcheck count? It's a static analysis tool for shell scripts https://github.com/koalaman/shellcheck
comment by CannisterFlux · 2017-12-04 · in Reflecting on Haskell in 2017 -
…I've found ShellCheck[1] to be pretty helpful when it comes to correcting typical mistakes. [1]: https://github.com/koalaman/shellcheck
comment by nunull · 2017-06-26 · in Ask HN: How can I get better at bash? -
Agreed, I saw this posted the other day https://github.com/koalaman/shellcheck and it's been interesting. I like some of the features in the other shells but bash is ubiquitous.
comment by noir_lord · 2017-05-18 · in Ask HN: For those programming 10+ years, what do you wish you knew 4 years in? -
…echo "($res)" > "/tmp/all-users.sexp" else handle_failure fi I second the recommendation to use https://github.com/koalaman/shellcheck – you really shouldn't be writing shell scripts without it – but in this case it doesn't seem to handle…
comment by unhammer · 2017-05-12 · in When Bash scripts bite -
…I feel like I can actually be confident that my scripts are doing what I think they're doing. [0]: https://github.com/koalaman/shellcheck
comment by mambodog · 2017-05-12 · in When Bash scripts bite -
…a corresponding github wiki page which describes the issues and common fixes. For example SC2002 ( https://github.com/koalaman/shellcheck/wiki/SC2002 )
comment by nodesocket · 2017-04-23 · in [ -z $var ] works unreasonably well -
FYI the author also offers an absurdly good commandline shellscript linter: https://github.com/koalaman/shellcheck It's a bit like `checkbashisms` but a lot more expansive and with formal classification of the warnings.
comment by frou_dh · 2017-04-23 · in [ -z $var ] works unreasonably well -
…- A Haskell library that simplifies access to remote data, such as databases or web-based services. https://github.com/koalaman/shellcheck - ShellCheck, a static analysis tool for shell scripts https://github.com/simonmichael/hledger - The…
comment by 0xmohit · 2016-08-02 · in Show HN: Learn Functional Programming Using Haskell -
…ways, in terms of syntax, of doing the same thing which behave the same most of the time. 0: https://github.com/koalaman/shellcheck/wiki/SC2086
comment by careersuicide · 2016-06-04 · in Shell Style Guide from Google -
If you're on Vim or Emacs you already (maybe) know you have integration with shellcheck Emacs - https://github.com/koalaman/shellcheck Vim - part of syntactic - https://github.com/scrooloose/syntastic/blob/master/syntax_c...
comment by jasonm23 · 2016-06-04 · in Common shell script mistakes (2008) -
Thanks for this! https://github.com/koalaman/shellcheck and `brew install shellcheck`
comment by sshykes · 2016-03-19 · in Use the Unofficial Bash Strict Mode (Unless You Love Debugging) -
…recommend the command line shellcheck[2] for linting. [1] https://github.com/sstephenson/bats [2] https://github.com/koalaman/shellcheck
comment by cakeface · 2016-01-13 · in Ansible 2.0 released -
…becomes a lot less error prone with shellcheck[1]. Syntastic for vim integrates well with it. [1]: https://github.com/koalaman/shellcheck
comment by woadwarrior01 · 2016-01-13 · in Ansible 2.0 released -
…shells cripts, shellcheck is a great tool. You can run it locally or use http://www.shellcheck.net/ https://github.com/koalaman/shellcheck
comment by sciurus · 2015-12-15 · in Bash Academy -
shellcheck is significantly older than shellshock, in terms of naming date anyways. https://github.com/koalaman/shellcheck
comment by Hello71 · 2014-12-21 · in ShellCheck: a static analysis and linting tool for sh/bash scripts -
From the source code: https://github.com/koalaman/shellcheck/blob/master/ShellChec... shellForExecutable "sh" = return Sh shellForExecutable "ash" = return Sh shellForExecutable "dash" = return Sh shellForExecutable "ksh" = return Ksh…
comment by Alupis · 2014-08-15 · in ShellCheck – Online shell script analyzer -
See also the version you can compile yourself and run in the terminal, written in Haskell: https://github.com/koalaman/shellcheck
comment by npongratz · 2014-08-15 · in ShellCheck – Online shell script analyzer -
…checker at http://www.shellcheck.net/ , and if you like it, the source for it is on github at https://github.com/koalaman/shellcheck .
comment by curiousbiped · 2014-04-16 · in Better bash in 15 minutes -
…old scripts. You can use the web interface or compile it for local use: http://www.shellcheck.net/ https://github.com/koalaman/shellcheck
comment by zwp · 2013-11-25 · in Bash Pitfalls -
I recommend the shell script static analyzer ShellCheck: https://github.com/koalaman/shellcheck
comment by knweiss · 2013-11-18 · in Shell script mistakes