Skip to content
This repository has been archived by the owner on Sep 9, 2019. It is now read-only.

Feature: Support golangci-lint linter #346

Open
kenjones-cisco opened this issue Dec 4, 2018 · 6 comments
Open

Feature: Support golangci-lint linter #346

kenjones-cisco opened this issue Dec 4, 2018 · 6 comments

Comments

@kenjones-cisco
Copy link

While being a fan of Gometalinter, there is a new option that is faster and easier to configure with support for all the other linters.
https://github.com/golangci/golangci-lint

It does support getting the output as json that could easily be consumed. It already includes govet, golint, and all the linters that gometalinter includes plus several more.

@saberduck
Copy link
Contributor

@kenjones-cisco thanks for the idea, we will have a look and consider if we want to support it natively. However, you can quite easily import the issues if you are able to transform the output to the format described here https://docs.sonarqube.org/latest/analysis/generic-issue/

@mykter
Copy link

mykter commented Feb 28, 2019

gometalinter is being deprecated in favour of golangci-lint.

@srizzling
Copy link

I've started working on this here: https://github.com/srizzling/sonar-go/tree/add-native-golang-ci-support

Only snag I've hit is I can't find a severity from the outputs already listed (without reading a colorized output when redirecting to a file). Might need to modify golangci-lint to be explicit.

@srizzling
Copy link

srizzling commented Mar 8, 2019

Ok.. Looks like golangci-lint itself reckons the default severity is error: https://github.com/golangci/golangci-lint/blob/master/pkg/printers/checkstyle.go#L31

@dharmjit
Copy link

dharmjit commented Jun 4, 2019

Hi All, any update on this. I guess it will be required, as golangci-lint is getting popular

@saberduck
Copy link
Contributor

@dharmjit it's on plan but it will take some time, because we want to rewrite Go support in SonarQube from scratch. In the meanwhile I recommend to have a look at https://docs.sonarqube.org/latest/analysis/generic-issue/ as a way to import issues from any tool

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants