Skip to content

limit PR to 400 LOC#939

Merged
cooperq merged 2 commits intomainfrom
loc-limit
Apr 15, 2026
Merged

limit PR to 400 LOC#939
cooperq merged 2 commits intomainfrom
loc-limit

Conversation

@cooperq
Copy link
Copy Markdown
Collaborator

@cooperq cooperq commented Mar 6, 2026

Lately we have received a large influx of pull requests, which is great, we want #868! However, some of these pull requests are quite large which make them difficult if not impossible to actually do code review on. I'm aware that some of you like to use AI coding agents and I'm not against that if you can explain / understand all your code, and you write the documentation yourself. But AI coding agents tend to cause people to make very verbose commits of 1000 or more lines, which are just impossible to review.

My proposal: going forward we limit pull requests to no more than 400 lines of code, if your features requires more lines than that you will have to break it up into smaller chunks. Any pull request longer than 400 lines (at our discretion, I'm not going to throw away my judgement just because a good pull request happens to be 401 lines) will be closed and the submitter asked to resubmit. Why 400? According to this study a reviewers ability to find bad code diminishes significantly after 400 lines of code. This is consistent with my lived experience as well. I'm would like to discuss this as a community and come to a decision in about a week unless everyone instantly agrees (though anyone with open PRs over 400 LOC would have my appreciation if they would resubmit.)

untitaker
untitaker previously approved these changes Mar 6, 2026
Copy link
Copy Markdown
Collaborator

@untitaker untitaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hard agree

Comment thread CONTRIBUTING.md Outdated
bmw
bmw previously approved these changes Mar 6, 2026
Copy link
Copy Markdown
Member

@bmw bmw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this sounds great to me as well

@BeigeBox
Copy link
Copy Markdown
Contributor

BeigeBox commented Mar 7, 2026

I would suggest a slight modification to not count tests towards LOC, otherwise that discourages testing which I doubt is ideal.

Co-authored-by: Markus Unterwaditzer <markus-tarpit+git@unterwaditzer.net>
@cooperq cooperq dismissed stale reviews from bmw and untitaker via 35c2000 March 10, 2026 21:19
@cooperq cooperq requested a review from untitaker March 10, 2026 21:19
@cooperq cooperq merged commit 8797518 into main Apr 15, 2026
22 checks passed
@cooperq cooperq deleted the loc-limit branch April 15, 2026 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants