When a patch cannot be downloaded and only-new-issues
is set, error instead of running
#996
Open
3 tasks done
Labels
enhancement
New feature or request
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
Go version
1.22.0
Code example or link to a public repository
N/A
The text was updated successfully, but these errors were encountered: