CI pipelines are an automated code review

I've worked on various teams over the last 13 years on which we've needed to do feature branches, pull requests and code reviews.

If the request isn't approved by (usually) two people, it won't be merged.

Instead of focusing on the problem that needed to be solved and how I'd done it, many reviews focused on the small details.

Do the lines have the correct number of spaces before them?

Do the comments end with a full stop?

Do the lines wrap at the correct point, and are your variable names in the right case?

Essentially, does the code comply with the agreed coding standards?

Here's the thing

Whilst important (you want the code to follow standards and be in a consistent format), doing these checks manually is not a good use of time and is not what the code review should focus on.

These checks can be automated using CI pipelines or Git hooks to run tools like PHPCS to review and sometimes fix coding standards issues.

Automating these checks means the Developers can focus on what they should be reviewing.

How are they solving the problem, not how many spaces is the code indented by.

- Oliver

P.S. If you're creating a new Drupal module, try my free Drupal module template.

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.