1 Overview
Code review sits at the intersection of two very different kinds of checking, and confusing them is one of the most common sources of friction in a development team. One kind of checking is mechanical. It asks whether a line follows the formatting rule, whether a variable is declared and never used, whether an import actually resolves, whether a pattern matches the lint configuration the team agreed on months ago. These questions have deterministic answers. You can write a rule that decides them, and the rule will give the same verdict every time it runs, on every machine, for every author. The other kind of checking is judgment. It asks whether this is the right design, whether the change belongs in this service at all, whether the code will behave correctly under load, and whether the author understands the tradeoff they just made. Static analysis is good at the first kind. Humans are good at the second. The trouble starts when teams blur the line and ask each to do the other's job.
This article is about drawing that line deliberately rather than letting it emerge by accident. It covers what static analysis can and cannot see, why the common advice to automate everything or to always review by hand both fail in practice, and how to build a review process where machines clear the mechanical noise before a person ever opens the diff. The goal is not to remove human review or to shrink it for its own sake. It is to make the human part worth the time it costs, so that the attention a reviewer spends goes toward questions only a person can answer.
The advice here is process guidance, not a substitute for your own judgment about your codebase, your risk tolerance, and your team's maturity. Every team has a different tolerance for noise, a different definition of a blocking issue, and a different level of automation already in place. Treat the patterns that follow as starting points you adapt to your situation, not rules you obey without thinking. The underlying principle is stable, but the specific boundary between machine work and human work will look different in a small library than in a large distributed system.
2 Why the usual advice misses the point
Two pieces of advice dominate conversations about review automation, and both are repeated so often that they sound like settled wisdom. The first says automate everything you can so that reviewers stop wasting time on trivia. The second says automation gives false confidence and only a human can really understand a change. Both contain a real insight, and both, taken literally, lead teams astray in predictable ways. The problem is not that either camp is entirely wrong. The problem is that each treats automation and human review as competing approaches to the same task, when in fact they address different questions.
The automate-everything camp tends to measure success by how many checks run rather than by what reviewers actually discuss. A pipeline with dozens of passing checks can still ship a change that breaks a business rule no linter was ever told about, because the rule lived in someone's head and never made it into configuration. Worse, when automation is noisy, reviewers learn to skim past it. A wall of warnings that nobody intends to fix teaches the team that warnings are background noise, and the checks become decoration. The human-only camp has the opposite failure. Reviewers spend their limited attention on indentation and naming while the architectural question sitting in the diff goes unasked, because everyone is tired by the time they reach it and the conversation has already been spent on trivia.
The point both camps miss is that automation and human review are not competing approaches to the same task. They are two stages of one funnel. Static analysis exists to remove questions that have deterministic answers so that the remaining questions, the ones with no single correct answer, get the attention they deserve. If your process does not create that funnel, adding more automation just adds more noise, and adding more reviewers just spreads the same noise across more people. The funnel is the thing that matters, not the volume of checks or the number of approvals.
3 The core idea in practice
The core idea is a division of labor based on determinism. If a question has one correct answer that can be checked without understanding intent, a machine should answer it. Formatting, unused variables, unreachable branches, forbidden imports, missing null checks in typed languages, and dependency policy violations all fit here. These are questions where the rule can be written down and applied consistently, and where a human adds nothing by answering them again by hand. If a question requires understanding why the change exists, what it is supposed to accomplish, or how it interacts with the rest of the system, a person should answer it. Design fit, naming that conveys intent, error-handling strategy, and whether the change is scoped correctly all belong to humans, because none of them can be decided without context the machine does not have.
In practice this means static analysis runs before human review, not alongside it. The author fixes mechanical findings first, so the reviewer opens a diff that is already clean of trivia. That ordering matters more than it sounds. A reviewer who starts by commenting on formatting has already spent attention that cannot be recovered for the design question two files later. Attention is the scarce resource in review, and the order in which questions arrive determines how much of it is left for the ones that matter. Running checks first is not about speed. It is about protecting the reviewer's focus for the work only they can do.
It also means the team decides, explicitly, which checks are blocking and which are advisory. A blocking check stops the change until it is resolved. An advisory check is information the author may act on. Mixing the two without labeling them teaches everyone to ignore both, because the author cannot tell which findings are mandatory and the reviewer cannot tell which ones were already considered. The division of labor only works when the boundary is visible and stable, and that boundary is a team decision, not a default that ships with a tool.
4 A repeatable review process
A workable process has four stages, and each one exists to hand off a cleaner artifact to the next. First, the author runs the automated checks locally before opening a review, so the first version a reviewer sees is already free of mechanical findings. Second, the automated pipeline runs the same checks plus any that require the full build or dependency graph, and reports a clear pass or fail rather than a pile of ambiguous output. Third, the author writes a short description of what the change does and why, including anything the reviewer should know that the diff cannot show, such as a constraint discovered during implementation or a decision that looks odd but was deliberate. Fourth, the human reviewer reads that description first, then the diff, and comments only on things automation cannot judge.
Each stage has an exit condition, and the conditions are what keep the process from degrading into a stall. The author does not request review until local checks pass. The pipeline does not hand off to a human until it has a verdict, so the reviewer never has to guess whether a failing check is real. The reviewer does not approve until they can explain the change in their own words and believe it is correct. These conditions sound obvious when written down, but teams that skip them end up with reviews that stall on formatting or approve changes nobody understood. The exit conditions are cheap to state and expensive to skip.
The process should also have a feedback loop, because the boundary between machine work and human work is not fixed. When a reviewer catches something a check could have caught, that is a signal to add or tighten a check. When a check fires on something that is actually fine, that is a signal to adjust the rule or its severity. Over time the boundary moves as the codebase and the team mature, and the process should move with it. A review process that never changes is usually one that has stopped learning from its own review comments.
5 Common mistakes reviewers make
The first mistake is using automation as a substitute for reading the change. A green pipeline means the mechanical checks passed, nothing more. It does not mean the design is sound, the error handling is correct, or the change belongs where it was placed. Reviewers who approve on green alone are trusting a tool to answer questions it was never designed to answer, and the failures that result are usually the expensive kind because they involve intent and context. The tool cannot see intent, so it cannot warn you that the intent was wrong. Only a person reading the change with the surrounding system in mind can catch that.
The second mistake is the reverse: letting human review absorb work automation should do. When reviewers comment on spacing, import order, or naming conventions that a formatter or linter could enforce, they are spending scarce attention on questions with deterministic answers. This is not just inefficient. It trains authors to expect style feedback from people, which makes the review slower and more personal than it needs to be. A comment about spacing reads as a comment about the author's care, even when it was meant as a neutral observation, and that friction accumulates across a team until people dread opening a review at all.
The third mistake is letting automated findings accumulate without triage. A pipeline that reports hundreds of warnings nobody intends to fix is worse than no pipeline, because it teaches the team that warnings are background noise and the habit of skimming carries over to the checks that do matter. Every check should either be enforced or removed. A check that is permanently advisory and permanently ignored is a check that has quietly stopped working, and the team usually does not notice until something important slips through. The discipline of removing checks that no longer earn their place is as important as the discipline of adding new ones.
6 Tooling that helps (and where it fails)
The tooling category here is static analysis and automated code-quality checking, integrated so that results appear in the same place as the review rather than in a separate dashboard nobody opens. Useful capabilities include formatting enforcement, lint rules for language-specific hazards, type checking, dependency and license policy checks, and complexity or duplication thresholds. The specific products matter less than whether the team has configured them deliberately and whether their output is legible to the person who has to act on it. A check that produces a clear message pointing at the exact line and explaining the rule is worth more than three checks that produce cryptic codes the author has to look up. Legibility is not a cosmetic concern. It determines whether the finding gets fixed or ignored.
Where this tooling fails is at anything requiring intent. Static analysis cannot tell whether a function name communicates the right idea, whether an abstraction is premature, whether an error is being swallowed because the author misunderstood the failure mode, or whether a change belongs in this service at all. It also cannot weigh tradeoffs. A check can flag a long function, but only a person can decide whether the length reflects genuine complexity or a clear sequence of steps that reads well. The same measurement can indicate a problem or a perfectly reasonable solution, and the tool has no way to tell the difference. That gap is not a flaw to be fixed with a better rule. It is the boundary of what deterministic checking can do.
A second failure mode is configuration drift. Rules that made sense for a small codebase become wrong as the system grows, and nobody revisits them. A threshold tuned for a few thousand lines can become noise at a few hundred thousand, and a rule written for one framework can misfire after a migration. The fix is to treat the check configuration as a living artifact, reviewed periodically like any other code, rather than a one-time setup. Automation is only as good as the judgment that configured it, and that judgment needs maintenance just as the code does.
7 Frequently asked questions
How do we decide which checks should block a change? Start from consequence rather than from convenience. If a violation can cause a production incident, a security problem, or a broken build, it should block, because the cost of letting it through is high and the cost of fixing it before merge is low. If it is a style preference or a soft quality signal, make it advisory or remove it entirely. The test is not how easy the check is to write but how bad the outcome is when it is ignored. Teams that block on everything end up with a pipeline nobody respects, and teams that block on nothing end up with a pipeline nobody reads.
What if the team disagrees about a rule? Treat the disagreement as a design conversation, not a tooling problem. The rule encodes a decision, and if the team cannot agree on the decision, the rule will be contested every time it fires. Resolve the underlying question first, then configure the check to match. If the team genuinely cannot reach agreement, that is useful information: it usually means the rule is a matter of taste rather than a matter of correctness, and taste is a poor candidate for a blocking check. Leaving it advisory is often the honest resolution.
How much review is enough? There is no universal number, and any figure quoted as a standard should be treated with suspicion. The useful question is whether the reviewer could explain the change and defend it if asked. If they can, the review did its job. If they cannot, more approvals will not help, because the problem is understanding rather than coverage. Adding reviewers to a change nobody understands produces more signatures, not more confidence.
Does automation make review faster? It makes review shorter by removing mechanical work, which is not the same thing. The saved time is only valuable if it is reinvested in the judgment questions. Otherwise the team simply reviews less and calls it efficiency, and the design problems that human review was supposed to catch arrive in production instead. The measure of success is not how quickly a change merges but whether the questions that mattered were actually asked before it did.