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. Shellcheck https://github.com/koalaman/shellcheck has excellent functional unit tests
    comment by anardil · 2020-07-10 · in Against Testing
  2. …is configure ShellCheck in your text editor's linter, and then do everything it tells you to do: https://github.com/koalaman/shellcheck/
    comment by vCponEt3kuFMT3F · 2020-05-29 · in Useless Use of Cat Award (2000)
  3. …is written to the POSIX standard of shell that runs differently? I only write POSIX shell, and use https://github.com/koalaman/shellcheck to verify that to prevent that exact thing.
    comment by moreaccountspls · 2020-05-28 · in Hypermodern Python
  4. …in hindsight but not many other tools are so good. Also, tangentially, this is also so perfect: https://github.com/koalaman/shellcheck/wiki/SC2154 and, unless somebody proves otherwise, makes me believe that with ShellCheck and using the…
  5. …tells many of the rules you're supposed to abide by and helps you write cleaner shell script. https://github.com/koalaman/shellcheck
    comment by mekster · 2020-02-01 · in Writing Safe Shell Scripts (2019)
  6. 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)
  7. ▲ 5
    ShellCheck: Lint for Shell Scripts
    story by sci_c0 · 2020-01-05 · 1 comment
  8. …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)
  9. …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.
  10. ▲ 1
    ShellCheck – a static analysis tool for shell scripts
    story by duck · 2019-07-30 · 0 comments
  11. …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
  12. …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
  13. 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`
  14. Shellcheck[0] is the Haskell program I use the most. [0]: https://github.com/koalaman/shellcheck
  15. 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?
  16. …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…
  17. …"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)
  18. ▲ 10
    Ask HN: Beautiful shell code?
    story by xelxebar · 2018-06-13 · 2 comments
  19. …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
  20. 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
  21. …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
  22. …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
  23. …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
  24. 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
  25. …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?
  26. 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.
  27. …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
  28. …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
  29. ▲ 4
    Shellcheck linter rule SC2002: Useless use of cat
    story by devy · 2017-04-25 · 0 comments
  30. …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
  31. 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
  32. ▲ 3
    ShellCheck – A shell script static analysis tool
    story by rmhsilva · 2017-03-31 · 0 comments
  33. ▲ 6
    ShellCheck, a static analysis tool for shell scripts
    story by EwanToo · 2016-12-22 · 0 comments
  34. …- 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…
  35. …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
  36. 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)
  37. Thanks for this! https://github.com/koalaman/shellcheck and `brew install shellcheck`
  38. ▲ 7
    ShellCheck – A shell script static analysis tool
    story by cujanovic · 2016-03-02 · 0 comments
  39. …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
  40. …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
  41. …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
  42. ▲ 2
    ShellCheck, a static analysis tool for shell scripts
    story by dmmalam · 2015-08-04 · 0 comments
  43. shellcheck is significantly older than shellshock, in terms of naming date anyways. https://github.com/koalaman/shellcheck
  44. 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…
  45. 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
  46. ▲ 2
    ShellCheck - A shell script static analysis tool
    story by AdamGibbins · 2014-07-07 · 0 comments
  47. ▲ 1
    ShellCheck, a static analysis tool for shell scripts, written in Haskell
    story by g3orge · 2014-05-29 · 0 comments
  48. …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
  49. …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
  50. I recommend the shell script static analyzer ShellCheck: https://github.com/koalaman/shellcheck
    comment by knweiss · 2013-11-18 · in Shell script mistakes