Enabling Gometalinter with Jetbrains Editors
I’ve been using Jetbrains editor (the free Idea community edition) or Pycharm with the Go plugins and very happy with this setup, the editor is providing some realtime linting but I was missing gometalinter
.
First install gometalinter
go get -u github.com/alecthomas/gometalinter
gometalinter --install --update
To add support inside Jetbrains editors use the External tools feature.
In Preferences > Tools > External Tools, add a configuration.
Set the Program path to your $GOPATH/bin/gometalinter
Parameters to --deadline=15s --vendor $FileDir$
Working directory to $ProjectFileDir$
For the linters messages to be clickable and jump to code add an Output filter with Regular expression to match output $FILE_PATH$:$LINE$