Hacker GitHub

← All repos

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

Mentions per year 100 mentions · busiest year 2022 (15)
20082026
  1. 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)
  2. …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)
  3. …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.
  4. …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
  5. …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
  6. 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`
  7. Shellcheck[0] is the Haskell program I use the most. [0]: https://github.com/koalaman/shellcheck
  8. 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?
  9. …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…
  10. …"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)
  11. …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
  12. 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
  13. …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
  14. …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
  15. …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
  16. 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
  17. …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?
  18. 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.
  19. …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
  20. …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
  21. …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
  22. 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
  23. …- 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…
  24. …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
  25. 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)
  26. Thanks for this! https://github.com/koalaman/shellcheck and `brew install shellcheck`
  27. …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
  28. …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
  29. …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
  30. shellcheck is significantly older than shellshock, in terms of naming date anyways. https://github.com/koalaman/shellcheck
  31. 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…
  32. 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
  33. …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
  34. …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
  35. I recommend the shell script static analyzer ShellCheck: https://github.com/koalaman/shellcheck
    comment by knweiss · 2013-11-18 · in Shell script mistakes