Search code examples
gointellij-ideagoland

Goland: run arbitrary code quality tool, get clickable results


I have an (in-house) code quality tool that produces results like this, when run from the shell:

fooer/quxxer_bulk_stuff.go:40:16: rhubarb rhubarb...
fooer/quxxer_load.go:22:16: rhubarb rhubarb...
fooer/quxxer_load.go:78:16: rhubarb rhubarb...

How do I configure Goland so that I can run the tool on demand (i.e. not a File Watcher) and have the results appear in a run window? Also, I want to be able to click on a line in the results and jump to the referenced file and line, so I can review/fix the problem.

(Goland version 2019.1, Build #GO-191.6183.86)


Solution

  • You can configure it as an external tool in Settings | External Tools. To get clickable results, define an output filter ($FILE_PATH$:$LINE$:$COLUMN$:.* should work for your case). See the documentation for more information.