golangci/golangci-lint-action

Run only specific linters in `only-new-issues` mode

Closed this issue · 1 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.

I would like to run a linter, in my case goheader, only on newly added/modified files, but I still want to run the other linters on all files.

Describe the solution you'd like.

Add an option only-new-issues-linters: [] taking a list of linters.
If it's non-empty, it means we want to run only these specified linters on new issues, and the rest should run on all files (aka existing issues).

Describe alternatives you've considered.

only-new-issues could take two fields:

only-new-issues:
  default: true
  linters: []

Additional context.

Initially created golangci/golangci-lint#5290 but realised what I needed is on this repository really.