How to properly integrate golangci-lint into Goland

Hello.

I can't integrate golangci-lint into Goland. When I go into the “Problems” tab I get some errors but they differ from what I see in golangci-lint on the terminal.

I have “warning from golangci-lint” enabled in settings but they seem to have no effect on what I see in “Problems” tab.

Can someone give me a hint, I want the “problems” tab to only show golangci-lint errors for the file/project nothing else.

0
4 comments

I added golangci-lint to both External Tool and File Watcher and I enabled only “File watcher problems” but “External Tool” does not appear in Inspections.

Overall it doesn't report any problems when I run “Inspect code”.

Finally, it's very very bad that Golang doesn't not easily integrate with the CI system but instead runs some custom linters. IDE integrating into the CI system the team uses it basic, must have functionality.

0

Hi there!

Thank you for your questions. May I ask if you tried to configure the linter as described here - https://www.jetbrains.com/help/go/configuring-golangci-lint-in-the-go-linter-plugin.html? If this doesn't work as expected, can you provide some screenshots and code snippets illustrating the problem so we could check this in more detail? Thank you!

0

Hello.

 

Going through the tutorial above does not work. I expect the golangci-lint to work exactly like it works on the command line so I configured Golang to use golangci.yaml config file. Yet, when I run `golangci-lint run -c .golangci.yml ./...` I get two warnings for one file for example, but zero in Goland.

 

It does show some errors from golangci-lint but not all.

 

Can you please help integrate Goland with golangci-lint properly?

 

0

Hi Evgeniy Ivlev ! Let's see if we can help here. Do you have a project we can use for testing? I'd also kindly ask you to provide some screenshots to illustrate the differences in output that depend on how you run it - it'll help us understand if this is expected, or if there's some issue indeed.

Thank you!

0

Please sign in to leave a comment.