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. ▲ 3
    Gallery of Bad Shell Code
    story by behnamoh · 2025-12-30 · 0 comments
  2. I don't have the same impression, but https://github.com/PostgREST/postgrest and https://github.com/koalaman/shellcheck are some popular ones that may be useful to hn'ers. And https://github.com/mchav/dataframe?tab=readme-ov-file#datafr...…
    comment by kreyenborgi · 2025-11-01 · in GHC now runs in the browser
  3. Up to you but I think the way shellcheck wants that problem solved is by using _ as in for _ in https://github.com/koalaman/shellcheck/wiki/SC2034#intention...
    comment by mdaniel · 2025-05-26 · in TIL: timeout in Bash scripts
  4. There's now an issue for it https://github.com/koalaman/shellcheck/issues/3088
  5. …GitHub repo, and over 100 contain "false positive". I recognize several of these at first glance. https://github.com/koalaman/shellcheck/issues?q=is%3Aissue+i...
  6. …ttp//funprojects.blog/2021/01/25/zenity-command-line-dialogs/ [1a] : http://www.shellcheck.net/ [1b] : http://github.com/koalaman/shellcheck [0a] : http://www.tecmint.com/history-command-examples/ [0b] :…
    comment by sargstuff · 2024-04-19 · in Ask HN: Is there a GUI for bash shell?
  7. ShellCheck: https://github.com/koalaman/shellcheck
  8. …using directives: https://www.shellcheck.net/wiki/Directive The error checks can be pretty arcane: https://github.com/koalaman/shellcheck/wiki/Checks I appreciate that the text for each check is brief and usually includes a suggestion. I…
  9. zsh was originally supported, but unceremoniously removed: https://github.com/koalaman/shellcheck/issues/298 I've had great experiences with this tool, but, for some reason, this issue always makes me question taking too great a dependency…
  10. shellcheck, whilst not a script itself, I do find it useful when writing them. - https://github.com/koalaman/shellcheck
    comment by comprev · 2023-08-13 · in Ask HN: Share a shell script you like
  11. …of using your riced-out, LSP-enabled editor https://github.com/bash-lsp/bash-language-server https://github.com/koalaman/shellcheck https://github.com/idank/explainshell
  12. There's an issue already about it: https://github.com/koalaman/shellcheck/issues/760
  13. …to a bigger scope are mandated to be the next line right after shebang and apply to the whole file. https://github.com/koalaman/shellcheck/wiki/Directive > Directives that replace or are immediately after the shebang apply to the entire…
  14. …The web is full of contradictory guides and shellcheck seems to be the last line of defense. - https://github.com/koalaman/shellcheck
  15. …as which, and is not a substitute for it in shell scripts. There is no direct substitute. See: https://github.com/koalaman/shellcheck/issues/1162
  16. I throw all my shell scripts through this beast of a haskell application to see if they're clean: https://github.com/koalaman/shellcheck Crucially it shows where on the line the error is in case I've got some large piped one-liner which…
    comment by jamal-kumar · 2023-02-11 · in Shfmt – format shell programs
  17. …of C++. I'm not adept at evaluating a Haskell source base to do a translation to C++ either. [0]: https://github.com/koalaman/shellcheck
  18. …oft.com/en-us/visualstudio/python/lintin... If you also want a linter for bash, check out shellcheck: https://github.com/koalaman/shellcheck
  19. …Bash, it also has extensions for VS Code and other IDE's. It makes writing Bash much easier. [0] https://github.com/koalaman/shellcheck
  20. Shellcheck https://github.com/koalaman/shellcheck : Shell scripts are unavoidable, you have to write one every now and then but shell is a terrible language with massive footguns around every corner. I don't write shell scripts extensively…
    comment by avl999 · 2022-09-23 · in Software I’m thankful for (2021)
  21. ▲ 2
    ShellCheck: Shell script static analysis tool
    story by zhxshen · 2022-09-14 · 0 comments
  22. I also like, BASH Frequently Asked Questions https://mywiki.wooledge.org/BashFAQ and linter https://github.com/koalaman/shellcheck
    comment by nixcraft · 2022-08-19 · in Advanced Bash-Scripting Guide (2014)
  23. …on the github page [1]: docker run --rm -v "$PWD:/mnt" koalaman/shellcheck:stable myscript [1] https://github.com/koalaman/shellcheck
    comment by justin_oaks · 2022-08-15 · in Ask HN: Can I see your scripts?
  24. Some discussion on that here: https://github.com/koalaman/shellcheck/issues/58 The hadolint project does shell checking for Dockerfiles and it uses shellcheck: https://github.com/hadolint/hadolint So the approach is definitely feasible,…
  25. …interesting for many people (hopefully including you!): Start: https://github.com/topics/haskell https://github.com/koalaman/shellcheck https://github.com/PostgREST/postgrest https://github.com/hadolint/hadolint…
    comment by ParetoOptimal · 2022-06-08 · in Dhall: A Gateway Drug to Haskell
  26. IFS='\0' doesn't do what it seems: https://github.com/koalaman/shellcheck/wiki/SC2141 You almost always want "read -r": https://github.com/koalaman/shellcheck/wiki/SC2162
  27. …can be done with ansible/terraform, but I have not found an optimal way to do it yet. [shellcheck] https://github.com/koalaman/shellcheck [shfmt] https://github.com/mvdan/sh [sub] https://github.com/qrush/sub [bashdb]…
  28. …for 20+ years. Side note: it's also one of (or the ?) most popular Haskell projects out there: https://github.com/koalaman/shellcheck/
    comment by declnz · 2022-04-26 · in Hush, a modern shell scripting language
  29. …to the parse that shellcheck gives[0][1], is this stricter and/or more abstracted perhaps? [0] https://github.com/koalaman/shellcheck/blob/master/src/Shell... [1] https://github.com/koalaman/shellcheck/blob/master/src/Shell...
    comment by unhammer · 2022-03-29 · in Morbig – A Static Parser for Posix Shell
  30. ▲ 59
    Ask HN: Let's build Checkstyle for Bash?
    story by a-t-0 · 2022-02-20 · 69 comments
  31. ShellCheck agrees: https://github.com/koalaman/shellcheck/wiki/SC3003
    comment by CyberShadow · 2022-01-24 · in Lst.sh – Portable Shell Array Library
  32. This advice is largely automated by https://github.com/koalaman/shellcheck
    comment by anotherhue · 2021-12-07 · in Common shell script mistakes (2008)
  33. Changelog: https://github.com/koalaman/shellcheck/blob/master/CHANGELOG...
    comment by Fudgel · 2021-11-07 · in Shellcheck Version 0.8.0 Released
  34. ▲ 4
    Shellcheck Version 0.8.0 Released
    story by Fudgel · 2021-11-07 · 1 comment
  35. …(2) https://en.wikipedia.org/wiki/Here_document#Here_strings (3) https://github.com/koalaman/shellcheck (4) https://google.github.io/styleguide/shellguide.html
    comment by jspielberg · 2021-06-13 · in How to handle secrets on the command line
  36. …binary from the GitHub Releases page and put it in /usr/local/bin. Good enough for the time being. https://github.com/koalaman/shellcheck/releases
    comment by theobeers · 2021-05-04 · in ShellCheck: Finds bugs in your shell scripts
  37. …Selection with the regular expression "SC\d+" 2. Add an action to "Open URL...", with the URL " https://github.com/koalaman/shellcheck/wiki/\0 " (\0 will be replaced with the matched regex) 3. Now holding down the command key will change…
    comment by TheLocehiliosan · 2021-05-03 · in ShellCheck: Finds bugs in your shell scripts
  38. …consequences in the place of "say": "A && B || C is not if-then-else. C may run when A is true": https://github.com/koalaman/shellcheck/wiki/SC2015
    comment by j1elo · 2021-05-03 · in My Favorite One Liners
  39. If you’re interested in writing safe shell scripts then check out shellcheck: https://github.com/koalaman/shellcheck If you’re interested I’ve written a git hook for it that runs a check when you git commit:…
    comment by alblue · 2021-04-03 · in How to do things safely in Bash (2018)
  40. …but there are a couple of other interesting shell parser projects: * https://github.com/mvdan/sh * https://github.com/koalaman/shellcheck At Fig ( https://withfig.com ), we had to write a bash parser from scratch. These projects all work…
    comment by brendanfalk · 2021-04-01 · in Bash-LSP: A language server for Bash
  41. …about the problem. Does anyone know other programs that have a similar approach to error messages? https://github.com/koalaman/shellcheck/wiki/Checks
  42. ▲ 399
    ShellCheck: A static analysis tool for shell scripts
    story by ducktective · 2021-03-18 · 73 comments
  43. I highly recommend https://github.com/koalaman/shellcheck It's a wonderful piece of software to help and guide users writing shell scripts. Hook it up to your editor/IDE and all those arcane caveats will be things of the past.
  44. …more information: https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ... https://github.com/koalaman/shellcheck/
  45. …Shellcheck has become a very important tool to many people writing shell scripts: https://github.com/koalaman/shellcheck GitHub's semantic analysis is written in Haskell: https://github.com/github/semantic I'm not sure why Pandoc doesn't co
  46. …sh` but uses bash or zsh features. Never had a problem an never thought much about it. [0]: https://github.com/koalaman/shellcheck/
    comment by vbrandl · 2020-12-21 · in Bash 5.1
  47. …and ENV syntax highlighting. Overall still tinkering around, but Nova seems very promising. [1] https://github.com/koalaman/shellcheck
    comment by nodesocket · 2020-09-17 · in Nova by Panic
  48. Here's my full bash reading list: - ShellCheck: life-changing BASH linter and testing toolkit https://github.com/koalaman/shellcheck - 30 interesting commands for the Linux shell – Víctor López Ferrando…
    comment by nikisweeting · 2020-09-08 · in Bash Pitfalls
  49. Shellcheck? https://github.com/koalaman/shellcheck
    comment by boogies · 2020-09-07 · in Bash Pitfalls
  50. …Since the site is being hugged a little too much. I also really like https://github.com/koalaman/shellcheck
    comment by mey · 2020-09-07 · in Bash Pitfalls