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 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
  2. 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
  3. There's now an issue for it https://github.com/koalaman/shellcheck/issues/3088
  4. …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...
  5. …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?
  6. ShellCheck: https://github.com/koalaman/shellcheck
  7. …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…
  8. 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…
  9. 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
  10. …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
  11. There's an issue already about it: https://github.com/koalaman/shellcheck/issues/760
  12. …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…
  13. …The web is full of contradictory guides and shellcheck seems to be the last line of defense. - https://github.com/koalaman/shellcheck
  14. …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
  15. 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
  16. …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
  17. …oft.com/en-us/visualstudio/python/lintin... If you also want a linter for bash, check out shellcheck: https://github.com/koalaman/shellcheck
  18. …Bash, it also has extensions for VS Code and other IDE's. It makes writing Bash much easier. [0] https://github.com/koalaman/shellcheck
  19. 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)
  20. 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)
  21. …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?
  22. 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,…
  23. …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
  24. 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
  25. …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]…
  26. …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
  27. …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
  28. ShellCheck agrees: https://github.com/koalaman/shellcheck/wiki/SC3003
    comment by CyberShadow · 2022-01-24 · in Lst.sh – Portable Shell Array Library
  29. This advice is largely automated by https://github.com/koalaman/shellcheck
    comment by anotherhue · 2021-12-07 · in Common shell script mistakes (2008)
  30. Changelog: https://github.com/koalaman/shellcheck/blob/master/CHANGELOG...
    comment by Fudgel · 2021-11-07 · in Shellcheck Version 0.8.0 Released
  31. …(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
  32. …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
  33. …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
  34. …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
  35. 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)
  36. …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
  37. …about the problem. Does anyone know other programs that have a similar approach to error messages? https://github.com/koalaman/shellcheck/wiki/Checks
  38. 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.
  39. …more information: https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ... https://github.com/koalaman/shellcheck/
  40. …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
  41. …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
  42. …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
  43. 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
  44. Shellcheck? https://github.com/koalaman/shellcheck
    comment by boogies · 2020-09-07 · in Bash Pitfalls
  45. …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
  46. Shellcheck https://github.com/koalaman/shellcheck has excellent functional unit tests
    comment by anardil · 2020-07-10 · in Against Testing
  47. …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)
  48. …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
  49. …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…
  50. …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)