<story><title>ShellCheck: A static analysis tool for shell scripts</title><url>https://github.com/koalaman/shellcheck</url></story><parent_chain></parent_chain><comment><author>dang</author><text>If curious, the interesting past threads seem to be:&lt;p&gt;&lt;i&gt;Lessons learned from writing ShellCheck&lt;/i&gt; - &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;news.ycombinator.com&amp;#x2F;item?id=22279585&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;news.ycombinator.com&amp;#x2F;item?id=22279585&lt;/a&gt; - Feb 2020 (46 comments)&lt;p&gt;&lt;i&gt;Shellcheck: a static analysis tool for shell scripts&lt;/i&gt; - &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;news.ycombinator.com&amp;#x2F;item?id=9001931&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;news.ycombinator.com&amp;#x2F;item?id=9001931&lt;/a&gt; - Feb 2015 (46 comments)&lt;p&gt;&lt;i&gt;ShellCheck: a static analysis and linting tool for sh&amp;#x2F;bash scripts&lt;/i&gt; - &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;news.ycombinator.com&amp;#x2F;item?id=8777705&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;news.ycombinator.com&amp;#x2F;item?id=8777705&lt;/a&gt; - Dec 2014 (20 comments)&lt;p&gt;&lt;i&gt;ShellCheck – Online shell script analyzer&lt;/i&gt; - &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;news.ycombinator.com&amp;#x2F;item?id=8182745&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;news.ycombinator.com&amp;#x2F;item?id=8182745&lt;/a&gt; - Aug 2014 (14 comments)</text></comment>
<story><title>ShellCheck: A static analysis tool for shell scripts</title><url>https://github.com/koalaman/shellcheck</url></story><parent_chain></parent_chain><comment><author>acdha</author><text>This is one of my favorite tips for almost effortlessly improving devops productivity (along with using &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;mvdan&amp;#x2F;sh&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;mvdan&amp;#x2F;sh&lt;/a&gt; for auto-formatting) — by now shellcheck has good editor support in e.g. VSCode and I have a standard pre-commit.com hook for all of my projects. I&amp;#x27;ve seen so many long iterations where people flail at a complex shell script for something like a cron job which was immediately flagged by shellcheck. I generally recommend rewriting in Python but this is a good less invasive step.&lt;p&gt;One thing which might be worth considering is adding this to your personal ~&amp;#x2F;.shellcheckrc to make it more pedantic:&lt;p&gt;enable=all</text></comment>