Skip to content

There’s a human on the other end of that review

Section titled “There’s a human on the other end of that review”

Review code the way you’d want yours reviewed. Before you submit a comment, read it out loud. Would you be okay hearing that said to you? If not, rethink it.

Give actual suggestions, not just complaints

Section titled “Give actual suggestions, not just complaints”

Never tell someone their code is broken without explaining why and what to do about it.

“Fix this” is not helpful. Why does it need to be fixed? What would you do instead? Give the person something to work with.

Code is rarely written the same way by two different people. That’s fine. Before you push back, take a moment to understand what the author was thinking. They had a reason. Try to find it.

Be clear about what you want and how important it is

Section titled “Be clear about what you want and how important it is”
  • Optional suggestion or style preference? Say so. (“Nit: not blocking, just a thought.”)
  • Curious about a decision but it doesn’t block the PR? Say so.
  • Must be fixed before merging? Say so.

Don’t make the author guess which category your comment falls into.

Code reviews aren’t just for catching problems. If someone wrote clean, maintainable code or made a smart library choice, say so. Positive feedback is always welcome — and it costs you nothing.

Source