a·gen·tic a·gil·i·ty

Code Reviews for Quality Assurance

Explores modern code review practices, emphasising automation, pre-reviewed code, and shift-left strategies to improve software quality, speed, and team collaboration.

Published on
3 minute read
Image
https://nkdagility.com/resources/r2G-NrSIj2k
Subscribe

Rethinking Code Reviews: From Manual Checks to Pre-Reviewed Excellence

Hi, I’m Martin Hinshelwood, and today I want to discuss a topic that often sparks debate: code reviews. Traditionally, code reviews are seen as a way to improve quality and reduce defects by having multiple people review the code before it’s merged. While this has value, as we embrace shift-left practices, there’s a new perspective to consider: pre-reviewed code.

What if your code were effectively “reviewed” before it even reached a pull request? Let’s explore this evolving approach and how it can streamline your development process without sacrificing quality.

The Traditional View of Code Reviews

For years, the primary argument for code reviews has been:

  • Improved quality: Multiple eyes on the code can catch errors or highlight better ways to implement a solution.
  • Knowledge sharing: Reviews help team members learn from one another, spreading knowledge about codebases and best practices.

These benefits are real, but traditional code reviews can also introduce bottlenecks, especially if they rely too heavily on manual intervention.

Shifting Left: Pre-Reviewed Code

As we move toward modern engineering practices , there’s a growing emphasis on pre-reviewing code. Here’s what that means:

  • Automated validation: By the time a developer submits a pull request, the code should already pass a suite of automated checks.
  • Streamlined pull requests: With automated checks in place, pull requests become less about catching defects and more about strategic discussions, like architectural decisions or ensuring alignment with business goals.

Why Pre-Reviewed Code Matters

Shifting toward pre-reviewed code delivers several benefits:

1. Faster Delivery

  • Automated checks reduce the back-and-forth of manual reviews.
  • Pull requests move through the pipeline more quickly, enabling faster delivery of value.

2. Early Defect Detection

  • Automated tests and tools catch issues during development, not during the review phase.
  • Problems are addressed immediately, saving time and effort.

3. Consistency and Quality

  • Automated processes ensure consistent validation across all pull requests.
  • Best practices are enforced without relying solely on individual reviewers.

Best Practices for Code Reviews in a Shift-Left World

1. Automate Everything You Can

  • Use tools to catch defects, enforce coding standards, and validate functionality before the pull request is even submitted.
  • Examples of useful tools:
    • SonarQube/SonarCloud: For code quality and vulnerability analysis.
    • GitHub Actions or Azure DevOps Pipelines: For automated build and test processes.

2. Make Pull Requests Mandatory

  • No code should be merged into the mainline branch without going through a pull request process.
  • Ensure that all pull requests pass automated checks before being eligible for review.

3. Focus Manual Reviews on Strategy

  • Use code reviews to discuss architecture, business alignment, and other high-level considerations.
  • Minimize the focus on defects or style issues, as these should already be handled by automation.

4. Use Validated Checks

  • Require that all pull requests pass:
    • Unit tests
    • Integration tests
    • Static code analysis
    • Security checks
  • These checks should run automatically and provide immediate feedback to developers.

How Naked Agility Can Help

At Naked Agility, we’ve helped teams implement automated validation and streamlined code review processes. Here’s how we can support you:

  • Designing automated pipelines: Build automated checks into your CI/CD pipeline to catch defects early.
  • Establishing best practices: Create guidelines for pre-reviewed code and shift-left strategies tailored to your organization.
  • Tool selection and integration: Help you choose and implement the right tools for your development environment.

Our goal is to help you deliver high-quality code faster while reducing manual effort and bottlenecks.

The Future of Code Reviews

As engineering practices evolve, code reviews are becoming less about catching defects and more about fostering collaboration and alignment. By automating validation and shifting left, you can:

  • Accelerate delivery without compromising quality.
  • Empower developers with the tools and processes they need to write great code.
  • Focus manual reviews on what really matters—building better products.

Watch on Youtube

There are multiple schools of thought on code reviews. One school of thought is that code reviews help us improve our code quality and help reduce defects because we’ve got multiple eyes looking at the product. But I think that’s only part of the story. As we shift left, another school of thought starts to come to the forefront, which is our code should be pre-reviewed. A code review, a person manually code reviewing our code, should not actually be required because our code should already have been reviewed by the time we submit a pull request.

That would then enable all of our pull requests to be almost totally automated, or as automated as we can get, so that the pull request process itself is not becoming a blocker to deliver value in our business. There are lots of different techniques and practices within the context of code reviews. I very much support and value code reviews and pull request systems that are in place in GitHub and in DevOps.

I would absolutely recommend that nobody is able to commit code to master or main without going through a pull request and without passing validated checks. But those validated checks should be as automated as they can possibly be within the context of your system. Naked agility has helped others and can help you create automations and practices and procedures that enable you to have the highest quality possible code and detect defects as early as possible.

Software Development Shift Left Strategy
Subscribe

Connect with Martin Hinshelwood

If you've made it this far, it's worth connecting with our principal consultant and coach, Martin Hinshelwood, for a 30-minute 'ask me anything' call.

Our Happy Clients​

We partner with businesses across diverse industries, including finance, insurance, healthcare, pharmaceuticals, technology, engineering, transportation, hospitality, entertainment, legal, government, and military sectors.​

Ericson Logo

Ericson

Graham & Brown Logo

Graham & Brown

SuperControl Logo

SuperControl

Illumina Logo

Illumina

Emerson Process Management Logo

Emerson Process Management

Slicedbread Logo

Slicedbread

Alignment Healthcare Logo

Alignment Healthcare

Trayport Logo

Trayport

Akaditi Logo

Akaditi

Hubtel Ghana Logo

Hubtel Ghana

Flowmaster (a Mentor Graphics Company) Logo

Flowmaster (a Mentor Graphics Company)

Schlumberger Logo

Schlumberger

Xceptor - Process and Data Automation Logo

Xceptor - Process and Data Automation

Kongsberg Maritime Logo

Kongsberg Maritime

NIT A/S

Sage Logo

Sage

Freadom Logo

Freadom

Brandes Investment Partners L.P. Logo

Brandes Investment Partners L.P.

Ghana Police Service Logo

Ghana Police Service

Washington Department of Enterprise Services Logo

Washington Department of Enterprise Services

Royal Air Force Logo

Royal Air Force

New Hampshire Supreme Court Logo

New Hampshire Supreme Court

Nottingham County Council Logo

Nottingham County Council

Washington Department of Transport Logo

Washington Department of Transport

Jack Links Logo

Jack Links

Akaditi Logo

Akaditi

Boeing Logo

Boeing

DFDS Logo

DFDS

Epic Games Logo

Epic Games

Deliotte Logo

Deliotte