HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
koalaman
shellcheck
Haskell2013–2025
koalaman / shellcheck

shellcheck

ShellCheck, a static analysis tool for shell scripts

92Distinct people
100Mentions
5Explicit recommenders
40.3KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

ShellCheck, a static analysis tool for shell scripts

GitHub

Where it is used

  • GitLab — GitLab uses ShellCheck to lint its shell scripts. It also prescribes a GitLab CI/CD job configuration to run it across projects. Source
  • ShellCheck for Visual Studio Code — ShellCheck for Visual Studio Code bundles the ShellCheck tool and uses it to lint shell scripts, showing ShellCheck warnings in the editor and the Problems view. Source

What people are saying

One of my favorite things about Shellcheck is that the error messages come with a link to a wiki page about the problem. Does anyone know other programs that have a similar…

ufo used a recommendation phrase. 5 indexed comments match. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 8–Nov 15 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/15/2026, 12:03:30 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year100 dated mentions

Observed mentions: 2013-11-18 12:25:12 UTC to 2025-12-30 22:10:57 UTC.

0510152013-01-01 00:00:00 UTC to 2014-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments20132014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 6 mentions; 2 submissions, 4 comments2015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 8 mentions; 2 submissions, 6 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 9 mentions; 2 submissions, 7 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 10 mentions; 1 submissions, 9 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 6 mentions; 1 submissions, 5 comments20192020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 13 mentions; 1 submissions, 12 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 13 mentions; 2 submissions, 11 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 15 mentions; 2 submissions, 13 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 9 mentions; 0 submissions, 9 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20132013-01-01 00:00:00 UTC2014-01-01 00:00:00 UTC202
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC624
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC211
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC826
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC927
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC1019
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC615
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC13112
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC13211
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC15213
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC909
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC404
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC312

What Hacker News says

15 sources
The most successful haskell project I've seen in the wild is shellcheck [0]. Here is cloc run against the repo: $ cloc . 75 text files. 75 unique files. 12 files ignored. github.com/AlDanial/cloc v 1.90 T=0.08 s (788.1 files/s, 271069.0 lines/s) -------------------------------------------------------------------------------- Language files blank comment code -------------------------------------------------------------------------------- Haskell 29 2381 1321 15440 Markdown 5 393 0 1088 Bourne Again Shell 12 99 39 438 SVG 1
Read the rest
32 0 262 YAML 3 39 23 160 Dockerfile 6 35 54 104 Bourne Shell 8 3 4 99 -------------------------------------------------------------------------------- SUM: 64 2982 1441 17591 -------------------------------------------------------------------------------- I wouldn't say that this is a compressed version of a 100,000 lines 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
In Haskell, Ada, C++, Awk: An Experiment in Prototyping Productivity (1994) [pdf]
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 enough to remember all those footguns and even if I did, not sure I'd want to waste brainpower remembering all that archaic trivia. Shellcheck makes writing shell scripts bearable and dare I say somewhat enjoyable. They have managed to collate all the shell scripting potholes and tribal knowledge into one static analysis tool. No shell script now gets checked in at work or on my personal machine without being pumped through shellcheck.
In Software I’m thankful for (2021)
> I recently tried to get into Haskell, while also looking for relevant projects written in it on Github and couldn't find anything "interesting" (this may vary from person to person, obviously). Let me try covering 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 https://github.com/jaspervdj/patat https://github.com/smallhadroncollider/taskell https://github.com/fosskers/aura https://github.com/HuwCampbell/grenade https://github.com/Haskell-Things/ImplicitCAD https://github.com/lettier/gifcurry - GIF editor https://github.com/2mol/pboy - pdf management utility https://github.com/ChrisPenner/rasa - Extremely modular text editor built in Haskell https://github.com/samtay/tetris -
Read the rest
terminal interface for Tetris https://github.com/mattgreen/hython - Haskell-powered Python 3 interpreter https://github.com/lettier/movie-monad - A free and simple to use video player made with Haskell. https://github.com/dbousamra/hnes - NES Emulator written in Haskell
In Dhall: A Gateway Drug to Haskell
Not one-liners, but some of the tools that I have found helpful for working with large bash codebases are: - shellcheck and shfmt for linting and formatting - sub for organizing subcommands - bashdb for debugging scripts interactively via the VSCode extension I'm still missing a way to share modules with others like it 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] http://bashdb.sourceforge.net/ [vscode-bash-debug] https://github.com/rogalmic/vscode-bash-debug
In Bash-oneliner: A collection of handy Bash one-liners and terminal tricks
a-t-0·Feb 20, 2022Submission

Ask HN: Let's build Checkstyle for Bash?

After working with Bash and Shellcheck for a few months, I noticed I could improve my code quality by making it compliant with the Shell Style Guide by Google [0]. While working on that, I thought some aspects of this Shell style guide can be verified automatically, granted some assumptions/opinions are formed. So I looked around for linting tools and autoformatters for Bash: Shellcheck: https://github.com/koalaman/shellcheck From Asynchronous Lint Engine (ALE): https://github.com/dense-analysis/ale/blob/master/supported-... - bashate: https://github.com/openstack/bashate - cspell: https://github.com/streetsidesoftware/cspell/tree/main/packa... - Bash Language Server: https://github.com/bash-lsp/bash-language-server - shell -n flag: https://www.gnu.org/software/bash/manual/bash.html#index-set - sh(shfmt): https://github.com/mvdan/sh - shd
Read the rest
oc: https://github.com/reconquest/shdoc From this stack post [1]: - checkbashisms: http://man.he.net/man1/checkbashisms - shlint: https://github.com/duggan/shlint (archived) Prettier: https://marketplace.visualstudio.com/items?itemName=esbenp.p... Within all these linters and auto-formatters I did not find checks that enforce, for example, the Function Comments of the Shell Style Guide by Google: All function comments should describe the intended API behaviour using: Description of the function. Globals: List of global variables used and modified. Arguments: Arguments taken. Outputs: Output to STDOUT or STDERR. Returns: Returned values other than the default exit status of the last command run. Hence, I thought we could make a Bash linting tool that verifies compliance with the Shell Style Guide by Google. To do so, a brief start was made here [2]. It identifies/lists elements in that style guide that may be verified automatically. Since Bash has been around longer than me, I think there may be some people better suited for the development of this enhanced linter. Hence, I thought it might be wise, for impact and usability, to share this idea here. What do you say, HN? [0]: https://google.github.io/styleguide/shellguide.html [1]: https://stackoverflow.com/questions/3668665/is-there-a-stati... [2]: https://github.com/TruCol/checkstyle-for-bash
59 points · Open discussion

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.