fix: check unstaged files during ci lint #15120
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
golangci-lint run
makes changes to files for trivial lints, such as import ordering, but CI doesn't currently check for these changes like it does forfmt
andgen
. It might be possible to havegolangci-lint
return an error when it makes a change, but that would only be for Go, and it seems sensible to have it be language agnostic.There's perhaps an argument to be made (at least in my head) that
lint
shouldn't be making changes, only raising warnings/errors, but that's not whatgolangci-lint
has decided.