Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure output for sonar #458

Closed
gessnerfl opened this issue Apr 30, 2022 · 12 comments · Fixed by #769
Closed

Configure output for sonar #458

gessnerfl opened this issue Apr 30, 2022 · 12 comments · Fixed by #769
Labels
area: output enhancement New feature or request

Comments

@gessnerfl
Copy link

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?

@gessnerfl
Copy link
Author

Provided PR #475 as a proposal to support additional output formats in the GH action

@AFMiziara
Copy link

Any ideas when this feature can be introduced @gessnerfl ?

@gessnerfl
Copy link
Author

@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.

@ldez ldez added the enhancement New feature or request label Aug 7, 2022
@buger
Copy link

buger commented Sep 3, 2022

Much needed! Going to use fork for now.

@MatthiasWinzeler
Copy link

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?

@mariamihai
Copy link

Any update on this? :)

@ldez
Copy link
Member

ldez commented Jun 9, 2023

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.

@jrehwaldt
Copy link
Contributor

Judging from your requirements something like 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.

@ldez

This comment was marked as outdated.

@ldez
Copy link
Member

ldez commented Jun 9, 2023

Your branch seem better 🤔

@ldez
Copy link
Member

ldez commented Jun 9, 2023

@jrehwaldt can you open a PR?

@jrehwaldt
Copy link
Contributor

@jrehwaldt can you open a PR?

Check out #769.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: output enhancement New feature or request
Projects
None yet
7 participants