Description
Hi,
thanks for your awesome work on golangci-lint.
For using golangci-lint in ci/cd pipelines together with our well established Sonarqube, it would be helpful, if golangci-lint could print a gometalinter compatible format.
The gometalinter-format is one of Sonarqubes supported formats when importing external issues. See https://docs.sonarqube.org/latest/analysis/external-issues/
Today I'm using a perl regular expression to reformat golangci's output to the gometalinter format, which sonarqube understands.
golangci-lint run --deadline=30m --out-format=line-number | perl -pe 's/(?<file>[^:]+):(?<line>\d+):(?<col>\d*): (?<message>.*)\((?<linter>[^\(]*)\)/$+{file}:$+{line}:$+{col}:error:$+{message}($+{linter})/g'
This is far from optimal, but works.
I could provide a pull request.
What do you think?