📜 ⬆️ ⬇️

Reduce the number of errors using the Code Review checklist

In our article on effective code review, we recommended using a checklist. Checklists (checklists) are a great thing in a review: they ensure that the review actually passes through your team. They also help to identify and solve common difficulties.

A study by the Software Engineering Institute shows that programmers make 15–20 common mistakes. By adding such errors to the checklist, you can be sure that you will notice them when they appear and help you get rid of them for a long time.

So that you can start from something, here is a list of typical points:

Checklist CodeReview


General


Security

Documentation

Testing

You may also want to add to the checklist any items that are specific to your language and may cause problems.
Checklist deliberately does not cover all possible problems. You do not need a checklist that is so long that no one uses it. It is best to cover only common questions.
')

Optimize your checklist.

This checklist can be used as a starting point: you need to optimize it for your specific scenarios and problems. A great way to do this is to mark the questions that arise on your team during the review of the code for a short time. With this information you can find the most common mistakes of the team in order to then enter them into your checklist.
Do not be afraid to throw out from the checklist those elements that do not suit you (you may want to leave rare, but still critical points - for example, related to security).

Start using and keep up to date

As a rule, any checklist items should be specific and, if possible, give you an unequivocal answer to your question. This helps to avoid inconsistency of judgment.
Another good idea is to share the list with your team and get their acceptance of its contents. Periodically look through the checklist itself to check that every item in it is still relevant.
Armed with a good checklist, you can increase the number of defects detected during the review of the code. This will allow you to improve the coding standard and avoid poor quality reviews.
To learn more about the review code, you can read the video on our page .

Source: https://habr.com/ru/post/250491/


All Articles