Thursday, February 01, 2024

That's not what code reviews are for!

So, you're reviewing some code.

Here are some things you shouldn't be doing:

  • Leaving comments just to prove you've looked at it.
  • Commenting on existing parts of the code base not directly related to the specific change/PR.
  • Checking the code builds - CI should do this before you review anything.
  • Checking the tests run (& pass) - CI should do this before you review anything.
  • Checking that coding/styling/formatting conventions are met - tooling should enforce this, not you!

Instead, here's what you should be doing:

  • Verifying the code does what it's supposed to do?
  • Verifying the code does not do anything it shouldn't?
  • Checking the code doesn't introduce any new issues/bugs/potential future problems.
  • Confirming that you'd be happy to support and maintain this as part of the code base.
  • Ensuring that any follow-up work (including accrued technical debt) is appropriately logged. 

These are not complete lists, but hopefully, they are still useful.


Post a Comment

I get a lot of comment spam :( - moderation may take a while.