All the players in the software development industry are focused on delivering product with high-quality code. This poses a huge challenge, as time is of the essence, and doing code reviews to iron out any possible issues takes precious time.
It is a necessary part of development, however, so we all use different code review tools to smooth out the process and to make it as efficient as possible.
We asked some great tech companies what code review tools they use, and we put together a list with the top ones combining their experiences with our own.
Before we get down to code review tools, it’s important to mention that many developer teams use a project management tool to keep track of tasks and what state they’re in. Our devs use Jira, one of the most popular among developers.
Now let’s see what code review tools are trending among top tech companies!
The most obvious choice for a code review tool is GitHub. It’s a worldwide online development platform, almost like social media for developers. Basically, anyone who has ever written any code knows about it. Our teams at Coding Sans use it most of the time as well and so do many other companies.
“My favorite code review tool now is GitHub. When viewing a pull request, it lets you customize your view of the changes, comment on specific lines, and request changes or clarification. You can also integrate any level of linting and unit tests to ensure that the changes don't break things beyond what you see in the diff.
Going with a third-party code review tool just introduces complexity to an otherwise simple process.”
This is another excellent tool for code reviews, and it’s completely open-source. GitLab has a smaller active community compared to GitHub, but many developers love to use it. It also brings development tools and DevOps tools together to smooth out the workflow, which makes it a great choice for many projects.
“At Apres, we love using GitLab for code review. Having your repository, issues, commentary and team in one place maximizes our efficiency for each discussion or independent review. For each commit, you're given the diff as with any GIT management platform. The difference is that you can make aggregate comments at the commit, file and line level. You're able to tag a team member, an issue or even another commit, linked within the platform. I can't recommend it enough.”
Bitbucket is another top tool next to GitHub and GitLab. Bitbucket is not open source, but it has the option to use it self-hosted, it’s easy to set up and it has a nice UI. The community behind is not massively active, but many great companies use it as their main code review tool.
“We use Bitbucket for code review. Our entire development team sits together for the reviews, which is why we don't need to use something more complex.
Over the years, I have been in organizations ranging from those where management did not believe in code reviews to those that practiced formal peer programming. However, I believe there is a direct correlation between code review and overall quality. By using Bitbucket, we have been able to increase the overall quality and security of our code. In addition, Bitbucket enables us to manage multiple language streams in one place, setting the correct level of permissions with branch permission features. Using branch permission and pipeline means that our code is more secure internally.
“We use pull requests and code review features to help perform code reviews. Integrating Bitbucket has resulted in high-quality code and spreading knowledge of the system among developers. By using the CI/CD tool, we have been able to conduct better testing, which means we find security issues faster.”
Microsoft’s VSCode editor is fairly new among code review tools, as the feature to handle pull requests without leaving the UI has only been recently added. It’s a great feature as developers can review code under the exact circumstances they write it, so it’s quickly becoming a popular tool. Naturally, it works with GitHub, so that should be an obvious choice to work in the background if you choose Visual Studio Code.
“What makes VSCode so powerful when it comes to code reviewing is that it has a built-in code diff tool, which can take the original version of a source file, compare it to changes being proposed in a git commit/pull-request and then visually highlight where items have been added, removed or replaced in the file. For each code line that has changed, it provides a colored highlight of the affected source line and indication of what type of change (add/delete/replace) it is.
Visual Studio Code is super-fast and is able to compare large source files instantaneously, making it very easy to quickly analyze what changes have been proposed by a developer and then drill down into function calls and variable members to see what the impacts of those changes might be.”
We hid the secret weapon for master code reviewers as an extra, since we just want to keep it for ourselves. If you’re reading this right now: congratulations, you won the ultimate treasure.
There are legends of a time when Coding Sans had such a master in the ranks, but he mysteriously disappeared a couple of years ago. Other companies too have lead developers whispering about the legendary rubber duck method in the dark.
“His favorite tool is Rubber Duck Debugging.
“It doesn't have to be a rubber duck, obviously, but just having any inanimate object that you can go through your code with and explain it to is helpful. You go through line by line and explain each function to the duck; that way, you'll see if you missed anything because when you've written lines and lines of code, you tend to just scan it and miss the little things.”
He's also mentioned he wants us to invest in a giant rubber duck for the office...”
A linter may not exactly be a code review tool; however, we consider it an essential part of the process. Linters can be used for two base functions: to make developers follow the syntax requirements of any language, and to enforce stylistic guidelines.
The former shortens the code review process by catching faulty code as early as possible. The latter helps reviews by making sure all the code in the project is typed in the same format. So, it stays consistent, easily readable and saves time and effort on stylistic nitpicking during reviews.
It’s an open-source linter designed specifically to allow developers to create their own rules. The base set of rules is pluggable, just like anything you’ll write for yourself, so it’s highly adaptable to project and team needs.
“We're a React team and use ESLint as our linting utility. We love the ability to write high-level configuration documents and code style guides that keep everyone accountable. Paired with ESLint, we use Prettier, which helps beautify our code and takes most of the headache out of adding an automated linter into your development workflow.”
TSLint is a tool built specifically to deal with TypeScript code, also often used by our dev teams. It works along with the same base principals as ESLint: it’s open-source, and all rules are pluggable, so everything is customizable all the way.
The downside is losing some flexibility on setting up your own set of style rules, but for many projects or teams, it may be a sacrifice well worth making.
Prettier is a special addition to this list, as it’s not a fully realized linter. It’s basically a formatting ruleset you can plug into linters. It doesn’t touch the code itself, only it’s format, and it automatically reprints it in sync with the style guidelines.
It means you can use it on different programming languages, like TypeScript, HTML, CSS and others. The most common reason for teams to use Prettier is to stop debates and nitpicks on style. The style Prettier enforces could still be argued against, but generally, everyone can accept it, and it may be a compromise worth making for many teams. It’s an important tool in the Coding Sans arsenal.
There are many great code review tools out there. A key takeaway should be to try and automatize catching syntax errors or enforcing style guidelines as much as you can, before it ever gets to code reviews.
Then, you should pick one of the more widely used code review tools, as you can expect those to be up-to-date and as bug-free as they can be. When picking from the top tools, preference could weigh in just as much as the project’s needs.
Once you got all that down, buy a giant rubber duck, and throw everything else away. It will all work out.
Photo by Kelly Sikkema, Unsplash