The Code Review Journalreview desk · diff view

Review bench › Code Smells

Code Smells Are Not Bugs: Stop Fixing the Wrong Things

Checklist entry · recorded 2026-10-13

1 Overview

Code smells are surface signals that something in the code might be harder to understand, change, or test than it needs to be. A long method, a deeply nested conditional, a class that knows too much about another class, a duplicated block of logic, a parameter list that keeps growing: these are patterns that experienced developers learn to notice. What they are not is proof of a bug. A smell can sit in production for years without causing an incident, and a piece of code with no smell at all can still be wrong.

The confusion matters because review time is finite. Every comment a reviewer writes costs the author attention and the team a round trip. When reviewers treat smells as defects, they spend that budget on style and structure while genuine risks, such as an unhandled edge case, a race condition, or a silent failure path, slip through. The result is a review process that feels rigorous but is aimed at the wrong target.

This article argues for a deliberate separation. Smells deserve to be named, recorded, and prioritized, but they should be weighed against the purpose of the change under review. The goal is not to ignore code quality. It is to stop letting quality concerns crowd out correctness concerns, and to make refactoring a planned activity rather than an improvised one.

2 Why the usual advice misses the point

Much of the popular guidance on code review collapses two different questions into one: is this change correct, and is this code well structured? They sound similar, but they call for different responses. Correctness problems block a merge because shipping them causes harm. Structural problems usually do not block a merge, because the code works and the structure can be improved later. Treating them identically produces reviews that are slow, contentious, and unpredictable.

The usual advice also assumes that every smell should be fixed immediately, by the person who happened to touch the file. That assumption ignores cost. A small behavioral fix in a tangled module can balloon into a multi-day refactor if the reviewer insists on cleaning everything in sight. The author, who may not own that module, is now responsible for a risky change far beyond their original intent. Reviewers who do this are not being thorough; they are transferring risk and effort onto someone else without a plan.

There is a subtler failure too. Smell-driven reviews train authors to optimize for the reviewer's aesthetic rather than for the reader's understanding. Authors learn to split methods and rename variables to satisfy comments, not because the result is clearer. Over time the team accumulates churn: large diffs that change structure without changing behavior, which are exactly the diffs that hide real bugs. The advice to fix every smell sounds disciplined, but in practice it makes reviews noisier and less safe.

3 The core idea in practice

The core idea is to classify what you find before you decide what to do about it. During review, separate observations into three buckets: defects, which are behaviors that are wrong or unsafe; risks, which are behaviors that might be wrong under conditions you cannot fully verify; and smells, which are structural signals with no demonstrated behavioral impact. Only the first bucket should reliably block a merge. The second deserves a question or a test. The third deserves a note, not a gate.

Putting this into practice starts with language. Instead of writing that a method is too long, a reviewer can ask whether the method has a clear single responsibility and whether the length makes it hard to test. That reframes the comment as a question about maintainability rather than an assertion of wrongdoing. It also gives the author room to explain context the reviewer lacks, such as a constraint from an external system or a deliberate tradeoff made under deadline.

Context is the deciding factor. A smell in a stable module that rarely changes is a low priority. The same smell in a module that three teams edit every week is a real cost, because it slows everyone down repeatedly. A smell in a prototype or a one-off migration script may be irrelevant. Reviewers who ask how often this code changes and who depends on it will make better calls than reviewers who apply a fixed checklist. The judgment is the job; the smell is only an input.

4 A repeatable review process

A workable process begins before the review starts. The author states the intent of the change in a sentence or two: what behavior changes, what stays the same, and what is explicitly out of scope. That single habit prevents most smell-driven tangents, because the reviewer can see that a structural concern is outside the stated boundary and raise it separately rather than blocking the change.

During review, the reviewer reads for behavior first. They trace the new or modified paths, check error handling, look at boundary conditions, and confirm that tests cover the changed behavior. Only after that pass do they note structural observations. Those notes go into a separate list, clearly labeled as non-blocking, with enough detail that someone could act on them later. This keeps the merge decision about correctness while preserving the insight the reviewer gained.

After the review, the team needs a place for those notes to land. A backlog item, a tracking issue, or a scheduled refactoring session all work; what matters is that the observation is not lost and not silently converted into an obligation for the current author. Periodically, the team should review the accumulated list and decide which items are worth doing. Some will have become irrelevant. Others will have grown more urgent as the code changed around them. This rhythm turns refactoring from an argument inside a pull request into a normal planning decision, which is where it belongs.

5 Common mistakes reviewers make

The most common mistake is blocking a merge over a smell. A reviewer spots duplication or a long conditional and marks the change as needing work, even though the behavior is correct and tested. This forces the author into an unplanned refactor, delays the change, and often produces a larger diff that is harder to verify than the original. The smell may even be resolved, but at the cost of introducing new risk into a change that was previously safe.

A second mistake is scope creep disguised as helpfulness. The reviewer suggests renaming a variable, then extracting a method, then moving a file, and soon the change touches a dozen unrelated areas. Each suggestion is defensible in isolation, but together they bury the actual behavioral change under structural noise. Future readers of the history cannot tell what the change was for. Reviewers should ask whether a suggestion is necessary for this change to be correct and maintainable now, or whether it is merely an improvement that could wait.

A third mistake is inconsistency. The same smell is ignored in one review and treated as a blocker in another, often depending on who is reviewing or how tired they are. Authors cannot predict what will be demanded, so they over-engineer defensively or stop proposing small changes altogether. A team that agrees on which smells are worth raising, and how, gets more predictable reviews and more willingness to keep changes small.

6 Tooling that helps (and where it fails)

Automated quality scanners are genuinely useful for surfacing structural patterns at scale. They can flag duplicated blocks, excessive complexity, long functions, and unused code across an entire repository, which no human reviewer can do reliably by eye. When these signals are surfaced as advisory information rather than merge gates, they give reviewers a consistent vocabulary and help teams spot trends over time, such as a module whose complexity keeps climbing.

The failure mode is treating scanner output as a verdict. A tool cannot know whether a flagged method is a deliberate tradeoff, a stable piece of code that never changes, or a genuine maintenance burden. It also cannot weigh the cost of fixing the smell against the value of shipping the current change. When teams wire scanners directly into merge requirements, they create the same problem as the overzealous reviewer, only automated and applied uniformly to every change regardless of context.

A better arrangement is to run scanners on a schedule or on the whole codebase rather than as a per-change gate, and to route their findings into the same backlog where human observations go. Reviewers can then consult the findings when relevant without being forced to act on them mid-review. The tool supplies evidence; the team supplies judgment. Keeping that division clear is what makes the tooling helpful instead of obstructive, and it keeps the review conversation focused on whether the change is correct.

7 Frequently asked questions

Should I ever block a merge over a code smell? Occasionally, yes, but the bar should be high. If the smell makes the change impossible to verify, such as tangled logic with no tests around it, or if it will immediately mislead the next person to touch the code, blocking may be justified. The test is whether the structural problem creates a present risk, not whether the code could be nicer. When in doubt, raise it as a non-blocking note and let the team decide later.

How do I raise a smell without sounding pedantic? Ask a question instead of issuing a verdict. Ask whether the method has one clear responsibility, or whether the duplication is intentional. Questions invite context and keep the tone collaborative. They also make it easy for the author to say the structure is deliberate, which is useful information for everyone. If the author agrees it is a problem, the two of you can decide together whether it belongs in this change or a later one.

What if my team's culture rewards finding problems? Then the fix is at the level of incentives, not individual reviews. Track whether reviews catch real defects, not how many comments they produce. Celebrate small, focused changes and planned refactoring rather than large cleanups smuggled into unrelated work. Over time, the team will learn that precision is valued more than volume, and reviews will get faster and more useful for everyone involved.