I once worked on a team where a single pull request sat open for two weeks. Two weeks. It touched 47 files and added 3,000 lines. Reviewers kept saying they'd get to it, but nobody wanted to wade through that mess. The author eventually merged it without approval, and we spent the next month fixing the bugs it introduced. That's not a review process—that's a disaster waiting to happen.
If you're a tech lead or senior engineer on a team of 5 to 20 developers, you've probably felt this pain. You've tried telling people to review faster, but that just leads to sloppy reviews. You've tried telling them to be more thorough, but that slows everything down. It's a lose-lose.
I've spent the last few years fixing this on my own teams, and I've borrowed heavily from how Google does it. They've published a lot about their process, and while you can't copy-paste it into a small startup, the principles are solid. Here's what actually works.
1. Make your pull requests tiny. No, smaller than that.
The median change size at Google is about 24 lines. Over 10% of changes are just one line. And more than a third touch only a single file. When I first heard that, I laughed. But then I looked at our PRs: 300, 800, sometimes 2,000 lines. No wonder reviews took forever.
Small changes get reviewed faster and more thoroughly. They're less likely to introduce bugs, and if they do, they're easier to roll back. But here's the real win: small changes are easier to reject. Rejecting a 40-line change costs you an hour. Rejecting a 900-line change costs you a day and maybe a friendship.
So set a hard limit. On my team, we cap PRs at 400 lines of meaningful change. If it's bigger, you need a written exception. Split by concern, not by file count. If a feature needs a database migration, a service change, and a UI tweak, that's three PRs. Yes, it's more overhead, but it's worth it.
One caveat: sometimes a PR is large because it's a mechanical change, like renaming a function across the codebase. In that case, a large PR is fine—just make sure it's truly mechanical and doesn't sneak in logic changes.
2. Let the robots handle the boring stuff
I've seen teams waste hours arguing about import order. That's not a code review—that's a waste of time. Linters, formatters, and static analysis tools should handle style and simple checks. Humans should focus on logic, architecture, and edge cases.
Pick tools that fit your stack. ESLint for JavaScript, Bandit for Python, gosec for Go, Semgrep for cross-language security patterns. Wire them into CI so a failing check blocks the merge. Then add a quality gate. SonarQube's default gate, for example, checks four things: no new issues, all new security hotspots reviewed, test coverage on new code at least 80%, and duplication on new code at most 3%. That gate answers one question: is this ready to merge?
But be careful. Automation can become theater. I've seen a team enable a scanner, ignore its output for three months, then disable it because it was too noisy. If you turn on a gate, you must commit to fixing every failure. Otherwise you're just training people to ignore red.
3. Respond quickly, but don't interrupt deep work
Here's a rule I'd tattoo on every manager's forehead: respond to a review request within one business day. Ideally, first thing the next morning. Google's maximum is one business day, and quick responses matter more than total review time. Slow reviews kill velocity and breed resentment.
But don't interrupt deep work to do it. Getting back into flow after an interruption is expensive—more expensive for the team than making a reviewer wait a bit. So check the review queue at natural breakpoints, not on every notification. I usually do it after standup and after lunch.
Use 'LGTM with comments' liberally. If you're confident the author will address a minor suggestion—sorting imports, fixing a typo, removing an unused dependency—approve with comments instead of blocking. This is the single highest-leverage habit I've adopted.
4. Review for better code, not perfect code
The goal of code review is to improve the codebase over time. Google's senior principle: approve once the change definitely improves code health, even if it isn't perfect. There's no such thing as perfect code—only better code.
That means look at the overall design first, then functionality, complexity, tests, naming, and comments. Watch for edge cases, concurrency issues like deadlocks and race conditions, and user-facing behavior changes. And be vigilant about over-engineering—code made more generic than necessary, or functionality added for a future that may never arrive.
Label your comments by severity: nit, suggestion, or blocking. Offer solutions, not just problems. Be specific with file paths and line numbers. And if a reviewer says they don't understand your code, clarify the code itself or add a comment—don't write a paragraph in the review tool that future readers will never see.
Here's what a healthy review culture looks like:
- PRs under 400 lines, split by concern.
- CI runs linters, static analysis, and a quality gate before a human looks.
- First response within one business day; most responses within hours.
- Comments labeled nit / suggestion / blocking.
- Approval when code health improves, not when the code is flawless.
One more thing: write good descriptions. The first line should be a short imperative summary of what the change does, followed by a blank line. It shows up in version control history and should stand alone. 'Fix bug' is not a description. Include bug numbers, benchmark results, and links to design docs. Review the description before submitting—changes often morph during review.
If you do nothing else, cap your PRs at 400 lines and enforce a one-business-day response time. Everything else—linters, quality gates, severity labels—is easier once the unit of review is small and feedback is fast.
Sources
- Modern Code Review: A Case Study at Google (ICSE-SEIP '18) - https://www.papercache.org/papers/mlsys/system/2026/03/25/modern-code-review-a-case-study-at-google
- Google Engineering Practices - Small CLs - https://google.github.io/eng-practices/review/developer/small-cls.html
- Google Engineering Practices - Speed of Code Reviews - https://google.github.io/eng-practices/review/reviewer/speed.html
- Google Engineering Practices - Standard of Code Review - https://google.github.io/eng-practices/review/reviewer/standard.html
- SonarQube Server Docs - Understanding quality gates - https://docs.sonarsource.com/sonarqube-server/2026.1/quality-standards-administration/managing-quality-gates/introduction-to-quality-gates
Comments (0)
Please sign in to post a comment.
Don't have an account? Create one
No comments yet. Be the first to comment!