Code Review in a Minute
Semantic vs Stylistic Changes
Separate behavior-changing edits from formatting and naming noise so review time goes where risk lives.
In one sentence
Semantic changes alter observable behavior or contracts; stylistic changes alter presentation without intending to change meaning—reviewers must not treat them the same.
Why it matters
Agents and formatters produce large diffs full of whitespace, import order, and renames. If you skim everything equally, you miss the few hunks that change runtime behavior.
How it works
- Classify each hunk: behavior/contract change, pure style, generated output, or mixed.
- Review semantic hunks first: control flow, data shape, auth, API surface, migrations.
- Treat style-only hunks as noise unless they obscure semantic edits in the same file.
- Ask for semantic changes to be isolated from bulk formatting when the mix hides risk.
- Do not approve a “cleanup” PR until you have confirmed which hunks are not cleanup.
Example
Same PR, two kinds of edit:
Hunk A renames a local variable and rewraps lines. Hunk B changes when a session token is revoked. Spend review time on B; verify A does not accidentally alter equality or serialization along the way.
What this proves
A classification of hunks proves only how you grouped the diff under a stated rule—not that “stylistic” hunks are free of bugs.
What this does not prove
Calling a change stylistic does not prove behavior is unchanged. Renames and formatting can still break stringly-typed APIs, snapshots, or codegen.
Last reviewed 2026-09-09. Title for citation: Code Review in a Minute: Semantic vs Stylistic Changes.