ZedThree / clang-tidy-review

Create a pull request review based on clang-tidy warnings
MIT License
90 stars 45 forks source link

diff size should consider deletions #136

Open maliberty opened 1 week ago

maliberty commented 1 week ago

I created a PR that generated "Sorry, the diff exceeded the maximum number of lines (20000)" (here). The PR is the deletion of a module with little code addition. It seems like having less code shouldn't block clang-tidy from running. Does it make sense to count deleted lines against the maximum?

Thanks for the helpful tool!

ZedThree commented 1 week ago

Looks like the error is actually coming from Github when we ask for the diff of the PR -- that is, we don't care how big the PR is, but Github won't give us the diff if it's too large.

I'm not sure how we should deal with that. I agree that deleting 20k lines shouldn't stop clang-tidy from running! Maybe we can catch the exception, and then try requesting diffs only for non-deleted files?

maliberty commented 6 days ago

I'm no GH expert so I'll leave the best solution to you. That sounds reasonable. Its not a common operation and I'll just use admin merge on that PR.