Skip to content
Muhammet Şafak
tr
3 min read

Code Review: Dropping Syntax, Looking at Architecture

A good code review is not an argument about commas and naming. Hand the automatable parts to tools and focus the human on architectural decisions

TL;DR

Reviewer attention is limited and flows to the first formatting inconsistency it meets, so formatters, linters and static analysis should be enforced in CI and humans should be left only the questions a tool cannot answer: does the code belong here, is there a simpler design, was the failure path considered. A small PR is actually read; on a large PR the important points get missed and the approval is a formality.

Micrometer measuring the width of a grooved steel block on a workbench

One pull request had thirty comments. Twenty-eight were about formatting and naming: this whitespace, that variable name, a comma over there. The remaining two touched on logic. The real question that should have been asked — “does this code belong here” — was never asked at all.

A good code review is not an argument about commas. But reviews, left to themselves, drift exactly there.

Human attention is expensive

A reviewer’s attention is a limited resource. There’s only so much focus they can spend on a PR, and that focus flows to the first thing they see.

If the first thing they see is a formatting inconsistency, attention goes there — and nothing is left for design, architecture, or failure scenarios. Small, easily noticed problems overshadow large, important questions. This is the bikeshed effect: the trivial topic everyone has an opinion on gets ahead of the important topic no one can fully evaluate.

Automate what can be automated

The fix is simple: nothing a human doesn’t need to look at should reach a human.

  • Formatting is left to a formatter — it’s not even up for debate; the tool decides.
  • Style and simple errors are left to a linter and static analysis (PHPStan, Psalm).
  • These are enforced in CI; non-compliant code never even reaches review.

If a formatting comment was written, the setup is incomplete. With the right setup, that debate isn’t even possible.

The questions a human should ask

Once the tools have done the cleanup, the real review remains. The questions a human reviewer should ask:

  • Is this code in the right place? Does it cross a module boundary without permission? As I said in the modular monolith post, this is the most important question to ask in review.
  • Is there a simpler design? Does this change add unnecessary complexity to the system?
  • What happens when this code fails? Has the failure path been thought through?
  • Does this name carry the right concept? Naming — the part a formatter can’t solve, the part that genuinely belongs to a human.

These can’t be automated; that’s exactly why they’re a human’s job.

A review is a conversation, not a gate

Code review is not gatekeeping. Its purpose isn’t only to catch bugs; it’s knowledge sharing. The reviewer learns the code, the author gains another perspective, the team converges on a shared standard.

That’s why tone matters: “why did you do this this way” should be a real question, not an accusation. A good review culture is one where the author doesn’t go on the defensive.

Small PRs

One last practical point: big PRs don’t get a real review. No one can look deeply at an eight-hundred-line change; the result is an “LGTM” and a token approval. Small PRs, on the other hand, actually get read. Keeping the PR small is a precondition for a good review.


The value of a code review is not in the comma it catches but in the design question it asks. Hand everything that can be automated to the tools; leave the human only what a human can answer.

Let the linter look at syntax; you look at architecture.

Sources

Related

Comments

Sign in with your GitHub account to join the discussion. Comments are stored in GitHub Discussions.

Search the site

Start typing to search posts, projects and pages.

Esc to close Powered by Pagefind