Code reviews are about the code, not code style

If you do code reviews, they should be about reviewing the code and not about the style of the code.

There shouldn't be comments about whether tabs or spaces are used, how many spaces are on each line, where the braces are, or whether there should be semicolons.

A code style should be defined upfront and checking code against it can be done automatically with tools such as phpcs or Prettier.

You don't need to wait for a human to review the code style - automated tools can be run locally or in a CI pipeline and provide feedback much faster.

And if people aren't reviewing the code style, they can focus on reviewing the code itself.

- Oliver

Was this interesting?

Sign up here and get more like this delivered straight to your inbox every day.

About me

Picture of Oliver

I'm an Acquia-certified Drupal Triple Expert with 17 years of experience, an open-source software maintainer and Drupal core contributor, public speaker, live streamer, and host of the Beyond Blocks podcast.