Welcome
Description of the problem
I recently had a run of golangci-lint where the GitHub API responded with 422 downloading the patch for the PR. The PR was very small (6 lines, 1 file changed), but the API responded with the following:
failed to fetch pull request patch: RequestError [HttpError]: The diff could not be processed because too many files changed
This lint run has only-new-issues set, but without the patch it flagged a large number of issues in the entire repo because it ran without the patch.
It would be nice to have an option to error sooner and more obviously if the patch couldn't be downloaded instead of running the linter on the whole codebase. I understand that it may not be desirable for all use cases, so I propose making this a configuration option.
Version of golangci-lint
1.56.2
Version of the GitHub Action
4.0.0
Workflow file
Details
- name: Lint Main
uses: golangci/golangci-lint-action@3cfe3a4abbb849e10058ce4af15d205b6da42804 # v4.0.0
with:
version: v1.56.2
only-new-issues: true
args: -v --timeout=10m
Go version
1.22.0
Code example or link to a public repository
N/A
Welcome
Description of the problem
I recently had a run of golangci-lint where the GitHub API responded with 422 downloading the patch for the PR. The PR was very small (6 lines, 1 file changed), but the API responded with the following:
failed to fetch pull request patch: RequestError [HttpError]: The diff could not be processed because too many files changedThis lint run has
only-new-issuesset, but without the patch it flagged a large number of issues in the entire repo because it ran without the patch.It would be nice to have an option to error sooner and more obviously if the patch couldn't be downloaded instead of running the linter on the whole codebase. I understand that it may not be desirable for all use cases, so I propose making this a configuration option.
Version of golangci-lint
1.56.2
Version of the GitHub Action
4.0.0
Workflow file
Details
Go version
1.22.0
Code example or link to a public repository
N/A