Automated Code Reviews

Tim Leung
Indigo Digital
Published in
3 min readDec 7, 2018

This is a multi-part series to talk about our evolving engineering practice at Indigo after we have scaled our team and transition to an agile feature based team.

Agile teams are self-organizing with the full capabilities to complete a feature in their backlog. This is accomplished, in part, with code review. Code review helps our developers learn the code base, as well as help them learn new technologies and techniques that grow their skill sets which is a fundamental pillar at Indigo Digital.

Code Review, is the act of consciously and systematically convening with one’s fellow programmers to check each other’s code for mistakes, and has been repeatedly shown to accelerate and streamline the process of software development like few other practices can.

The assumption here is that we all understand the many benefits but instead I want to focus on how we have minimized the time our teams are spending on peer reviews while maintaining our high development standards.

What is the Problem?

At Indigo, we were adamant about code reviews for each merge we did to master even in the days we were using SVN. This process has translated over when we adopted git-flow and it is even more prevalent as that is a requirement for each pull request. As we examine our code review checklist, we realized that much of our time spent on the review process can be automated and caught earlier in the process, thus reducing the back and forth that typically happens on simple things such as noticing code complexity issues or consistent coding style.

What did we look for?

We came up with the following needs as we gather the troops and talked through what we are looking for in terms of an automated static code analysis tooling:

  1. Integrated with our workflow (IDE, BitBucket, BitBucket Pipelines)
  2. Support all our languages (C# and JavaScript)
  3. Centralized dashboard so that we can understand trends and growth/decline of issues over time
  4. Cost Effective (Hopefully free!)

How did SonarQube solve the issue

Snapshot of one of our projects going through SonarQube

With the extensive integration options offered by Sonarqube, our development team can have their code analyzed locally within their IDE prior to pushing the changes for a pull request. This allows us to maintain a common set of coding guidelines and rule sets in one place. Not only is SonarQube our central place to see how our quality is trending, we also integrated our code coverage report so we can see holistically the stability of the project. As the head of the development team or any of my team leads, it provides enough insights to have a pulse on our many applications.

We also extended SonarQube to cover all our integration testing suite managed by our amazing Automation Developers as code quality and maintenance is important in every code base.

When done right, code reviews save time in the long run and with our implementation of SonarQube, there are significant time savings from optimizing the work flow and use tools/automation when possible.

Stay Tune for Part 2 in our Series :)

--

--