golangci-lint-action
golangci-lint-action copied to clipboard
Configure output for sonar
I try to configure golangci-lint-action to provide output in checkstyle format as required by SonarCloud (https://docs.sonarqube.org/latest/analysis/external-issues/). Therefore I added the following configuration to the project:
output:
format: github-actions,checkstyle:golangci-lint-report.json
It seems that the configuration is not working as the output format is passed as CLI parameter to the action.
I tried to explicitly set the output format as args
in the with
configuration part of the action but this results in the error:
Error: Failed to run: Error: please, don't change out-format for golangci-lint: it can be broken in a future, Error: please, don't change out-format for golangci-lint: it can be broken in a future
I tried to configure both output formats (github action + checkstyle) to get the github annotations and in addition the checkstyle report for Sonar.
How can I adopt the output format?
Provided PR #475 as a proposal to support additional output formats in the GH action
Any ideas when this feature can be introduced @gessnerfl ?
@AFMiziara : I'm using my fork of this action at the moment and it is working fine. I have no idea if it will be included into the official action as I also wait for a response.
Much needed! Going to use fork for now.
same here - would be nice if we can use the this github action in combination with the sonar github action. can we somehow help to drive this forward? maybe rebase the fork for easier merging?
Any update on this? :)
The only requirement here is to keep github-actions
as format.
My suggestion is to parse the flag --out-format
value to add github-actions
(and clean it if needed).
There is no new option for the GHA, and all supported format can be used.
Judging from your requirements something like https://github.com/golangci/golangci-lint-action/compare/master...jrehwaldt:golangci-lint-action:support-out-format-args-overwrite ? I can make this a PR, refine it or you can go with #613 if that already suits your needs already.
the PR https://github.com/golangci/golangci-lint-action/pull/613 will fix the problem
Your branch seem better :thinking:
@jrehwaldt can you open a PR?
@jrehwaldt can you open a PR?
Check out #769.