Support to --out-format instead of convert results to Github Annotation
viniciusgabrielfo opened this issue · 2 comments
Welcome
- Yes, I understand that the GitHub action repository is not the repository of golangci-lint itself.
- Yes, I've searched similar issues on GitHub and didn't find any.
Your feature request related to a problem? Please describe.
Today the action automatic output results to github-action format and convert to annotations.
But for some solutions we need to output to other formats, one popular one is to export lint issues to Sonar: https://docs.sonarsource.com/sonarqube-cloud/enriching/external-analyzer-reports/#go
In this case, we need to output a checkstyle file and send to Sonar, but this is not allowed by this action.
I know that it's a "Github Action" and seems to make sense work only with Github Action features and I can use golangci-lint CLI manually to achieve this output, but this actions already handle a lot of useful stuffs like cache, be able to use it to other scenarios instead of Github Annotations could be cool.
Describe the solution you'd like.
Maybe create a option output-format that is default github-actions but if its not, create the file as an action output and do not try to converto things to Annotation.
Describe alternatives you've considered.
Create an option export-to-sonar (optional and default false), if set to true, the output is changed to checkstyle and action have an outputted file.
Additional context.
No response
Hello,
you can already do that:
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: stable
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.63
args: --out-format=checkstyleFYI, the action doesn't use github-actions format, and doesn't convert reports to annotations.
The github-actions format has been deprecated inside golangci-lint and not used by this action since v6.
The annotations are generated by actions/setup-go and not golangci/golangci-lint-action.
https://github.com/golangci/golangci-lint-action?tab=readme-ov-file#compatibility