Saturday, July 16, 2016

TIL: Geany and Shellcheck

I've been using Geany for a while. When I selected it, I was looking for a cross-platform text editor with convenience features for writing code because all of the IDEs I had tried were cumbersome. I wanted syntax highlighting and code folding. I was happy that Geany also includes auto-completion, project support, vertical selection (when that's useful, nothing else will work as quickly), and plugin extensibility.

More recently, I ran across Shellcheck and was impressed with what it detects. Of course I could use it online or on the command line, but wouldn't it be nice to have it integrated with Geany also? Sure it would! So I proceeded to look for a Shellcheck plugin for Geany, in a case of retrospectively-humorous linear thinking.

The punchline is that Geany doesn't need a plugin; it has a far simpler approach. When I open one of my bash scripts in Geany, the first menu item under the Build menu is Lint. Guess what lint on a shell script runs? Of course it runs shellcheck! So today I learned that the feature I wanted in Geany was already there in the most appropriate place ... once I broke out of the linear thinking.

No comments:

Post a Comment