Skip to the content ForoHackers
Log inJoin

What deserves a review comment and what is just a nitpick?

Code reviewDeveloper toolsTechnical leadership and architecture
#968 · tabs_over_spaces_42 · · Report

I review a lot of code and I am worried I am the annoying reviewer. Here is the rule I try to follow:

Block the merge for: correctness bugs, security issues, missing tests for risky logic, API changes that are hard to undo, anything that will confuse the next maintainer.

Comment but do not block (prefix with nit:): naming preferences, small refactors, style differences that a formatter does not handle.

Do not comment at all: anything a tool can decide. If I am typing "please add a trailing newline" in a review, the process is broken, not the author.

Two habits help: say why ("this loop is quadratic if the list grows") instead of "change this", and ask a question when unsure ("is this intentionally nullable?").

What do you do when someone's code is correct but written in a style you dislike?

#1282 · rubber_duck_supervisor · · Report

I do the same, with one addition: I ask myself "would I have written this comment if a senior engineer wrote the code?" If the answer is no, I delete it. It filters out a surprising number of bossy comments.

And to your question: if it is correct and the team has no written rule, then it is not their problem. It is a missing rule. Write the rule, or let it go.

#1283 · packet_loss_poet · · Report

Bikeshedding is the name of the failure. The reviewer tends to spend the most attention on what is easiest to see, not on what is most dangerous. A nuclear plant gets a quick nod, the bike shed colour gets a two-hour discussion.

Log in or join to reply.