Guide · Devlingo

Code review comments examples

Quick answer

Good code review comments examples share one pattern: a label, the issue and a reason, asked as a question when possible. “suggestion: could we extract this into a helper? It's repeated in three places.” Devlingo, an English app for developers, has a full Code Review category.

Updated 2 min readGambit Studio

Use without installing →Free in your browser, no sign-up

Suggest a change

ExampleWhat it means
suggestion: could we extract this into a helper? It's repeated in three places.Clear, with a reason
What do you think about using a map here instead of nested ifs?Soft suggestion
nit: I'd rename this to userCount.Optional

Ask a question

ExampleWhat it means
question: what happens if this list is empty?Edge case
Can you help me understand why we need the retry here?Ask for context
Is this covered by a test?Testing

Block the merge (politely)

ExampleWhat it means
issue: this will run one query per item; can we batch it?Performance problem
This needs to be fixed before we merge: the token is logged in plain text.Security
Let's not merge this until the migration has a rollback.Risk

Praise

ExampleWhat it means
Nice, this is much easier to read now.Positive
Great test coverage on the edge cases.Specific praise
TIL about this API, thanks!Learned something

Google's code review guide asks reviewers to be courteous and explain the why (Google engineering practices). Labels: nit, LGTM.

Learn the phrases, not just the words

Devlingo, Gambit Studio's English for developers app, has over 3,600 phrases for daily standups, code review, Slack, email, meetings and pull requests, ten new ones a day with real context and pronunciation, and a widget with the phrase of the day.

Sources

  1. Google engineering practices: code review comments
  2. Conventional Comments

Frequently asked questions

What people ask most about this, answered with the source.

How do you write a good code review comment?
Label it, describe the issue, give the reason and suggest a fix, ideally as a question.
How do you give negative feedback in code review politely?
Talk about the code, not the person, explain the impact and offer an alternative.
What are positive code review comment examples?
“Nice, much easier to read now”, “Great tests on the edge cases.”
DevlingoLearn tech phrases & speaking
Use without installingGet