oliverdavies.uk/content/node.4d1139c2-0183-4670-af08-003694dec455.yml

93 lines
3.5 KiB
YAML

uuid:
- value: 4d1139c2-0183-4670-af08-003694dec455
langcode:
- value: en
type:
- target_id: daily_email
target_type: node_type
target_uuid: 8bde1f2f-eef9-4f2d-ae9c-96921f8193d7
revision_timestamp:
- value: '2025-05-11T09:00:34+00:00'
revision_uid:
- target_type: user
target_uuid: b8966985-d4b2-42a7-a319-2e94ccfbb849
revision_log: { }
status:
- value: true
uid:
- target_type: user
target_uuid: b8966985-d4b2-42a7-a319-2e94ccfbb849
title:
- value: |
CI pipelines are an automated code review
created:
- value: '2023-08-29T00:00:00+00:00'
changed:
- value: '2025-05-11T09:00:34+00:00'
promote:
- value: false
sticky:
- value: false
default_langcode:
- value: true
revision_translation_affected:
- value: true
path:
- alias: /daily/2023/08/29/ci-pipelines-are-an-automated-code-review
langcode: en
body:
- value: |
<p>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.</p>
<p>If the request isn't approved by (usually) two people, it won't be merged.</p>
<p>Instead of focusing on the problem that needed to be solved and how I'd done it, many reviews focused on the small details.</p>
<p>Do the lines have the correct number of spaces before them?</p>
<p>Do the comments end with a full stop?</p>
<p>Do the lines wrap at the correct point, and are your variable names in the right case?</p>
<p>Essentially, does the code comply with the agreed coding standards?</p>
<h2 id="here%27s-the-thing">Here's the thing</h2>
<p>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.</p>
<p>These checks can be automated using CI pipelines or Git hooks to run tools like PHPCS to review and sometimes fix coding standards issues.</p>
<p>Automating these checks means the Developers can focus on what they should be reviewing.</p>
<p>How are they solving the problem, not how many spaces is the code indented by.</p>
format: full_html
processed: |
<p>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.</p>
<p>If the request isn't approved by (usually) two people, it won't be merged.</p>
<p>Instead of focusing on the problem that needed to be solved and how I'd done it, many reviews focused on the small details.</p>
<p>Do the lines have the correct number of spaces before them?</p>
<p>Do the comments end with a full stop?</p>
<p>Do the lines wrap at the correct point, and are your variable names in the right case?</p>
<p>Essentially, does the code comply with the agreed coding standards?</p>
<h2 id="here%27s-the-thing">Here's the thing</h2>
<p>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.</p>
<p>These checks can be automated using CI pipelines or Git hooks to run tools like PHPCS to review and sometimes fix coding standards issues.</p>
<p>Automating these checks means the Developers can focus on what they should be reviewing.</p>
<p>How are they solving the problem, not how many spaces is the code indented by.</p>
summary: null
field_daily_email_cta: { }