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 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 -
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 -
There's now an issue for it https://github.com/koalaman/shellcheck/issues/3088
comment by webstrand · 2024-11-22 · in TIL: Some surprising code execution sources in bash -
…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...
comment by xyzzy_plugh · 2024-09-14 · in Techniques I use to create a great user experience for shell scripts -
…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? -
ShellCheck: https://github.com/koalaman/shellcheck
comment by tlo · 2024-02-11 · in Ask HN: Popular open source tool originally written in Haskell? -
…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…
comment by w10-1 · 2023-11-23 · in Shellcheck finds bugs in your shell scripts -
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…
comment by cglong · 2023-11-23 · in Shellcheck finds bugs in your shell scripts -
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 -
…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
comment by b5n · 2023-08-11 · in Oils 0.17.0 – YSH Is Becoming Real -
There's an issue already about it: https://github.com/koalaman/shellcheck/issues/760
comment by lloeki · 2023-07-07 · in Tell HN: People forget that you can stick any data at the end of a bash script -
…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…
comment by lloeki · 2023-07-06 · in Tell HN: People forget that you can stick any data at the end of a bash script -
…The web is full of contradictory guides and shellcheck seems to be the last line of defense. - https://github.com/koalaman/shellcheck
comment by filereaper · 2023-06-20 · in “Exit traps” can make your Bash scripts more robust and reliable (2013) -
…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
comment by gwillen · 2023-02-18 · in Debian 12 “Bookworm” Enters Its Soft Freeze -
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 -
…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
comment by commandersaki · 2022-12-11 · in Haskell, Ada, C++, Awk: An Experiment in Prototyping Productivity (1994) [pdf] -
…oft.com/en-us/visualstudio/python/lintin... If you also want a linter for bash, check out shellcheck: https://github.com/koalaman/shellcheck
comment by 4oo4 · 2022-11-04 · in Ask HN: Python Script Best Practices? -
…Bash, it also has extensions for VS Code and other IDE's. It makes writing Bash much easier. [0] https://github.com/koalaman/shellcheck
comment by woudsma · 2022-10-07 · in Why doesn't Bash’s ‘set -e’ do what I expected? (2021) -
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) -
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) -
…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? -
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,…
comment by pabs3 · 2022-08-15 · in Checkmake: Experimental Linter/Analyzer for Makefiles -
…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 -
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
comment by jwilk · 2022-05-04 · in Bash-oneliner: A collection of handy Bash one-liners and terminal tricks -
…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]…
comment by bfm · 2022-05-03 · in Bash-oneliner: A collection of handy Bash one-liners and terminal tricks -
…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 -
…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 -
ShellCheck agrees: https://github.com/koalaman/shellcheck/wiki/SC3003
comment by CyberShadow · 2022-01-24 · in Lst.sh – Portable Shell Array Library -
This advice is largely automated by https://github.com/koalaman/shellcheck
comment by anotherhue · 2021-12-07 · in Common shell script mistakes (2008) -
Changelog: https://github.com/koalaman/shellcheck/blob/master/CHANGELOG...
comment by Fudgel · 2021-11-07 · in Shellcheck Version 0.8.0 Released -
…(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 -
…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 -
…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 -
…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 -
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) -
…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 -
…about the problem. Does anyone know other programs that have a similar approach to error messages? https://github.com/koalaman/shellcheck/wiki/Checks
comment by ufo · 2021-03-18 · in ShellCheck: A static analysis tool for shell scripts -
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.
comment by pwm · 2021-02-26 · in Intercal, YAML, and Other Horrible Programming Languages -
…more information: https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ... https://github.com/koalaman/shellcheck/
comment by ufo · 2021-01-16 · in Program Eloquence Considered Harmful -
…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
comment by Athas · 2020-12-28 · in New Haskell Foundation to Foster Haskell Adoption, Raises 200k USD -
…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 -
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 -
Shellcheck? https://github.com/koalaman/shellcheck
comment by boogies · 2020-09-07 · in Bash Pitfalls -
…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 -
Shellcheck https://github.com/koalaman/shellcheck has excellent functional unit tests
comment by anardil · 2020-07-10 · in Against Testing -
…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) -
…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 -
…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…
comment by acqq · 2020-02-09 · in Lessons learned from writing ShellCheck -
…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)