SDO Best Practices Catalog - Code Review Process
Benefits
The strongly defined code review process allows to avoid functional and non-functional defects appearing, prevents anti-patterns and bad practices in the code, increases maintenance of the product, forces code conventions across the team, and lets the team members share knowledge between each other.
The code review increases responsibility for the code quality by each team member.
Using a code review tool simplifies the code review, when it is needed to involve several reviewers, enables involvement of an observer role, and decouples an author and a reviewer, as the author is not required to wait for the reviewer to start a review. In addition, the reviewer is able to review just updated changes in comparison to failed review changes that simplifies and speeds up the review process.
Indicators of Successful Process
The code review procedure is defined and documented
Code review checklist is used
Code is reviewed against requirements (code and project conventions, specified architecture, functional and non-functional requirements, security guidelines)
Code review is used as learning and knowledge sharing instrument and share typical findings among team members
Code review workflow is using best practices for selected tool
Code review is automated (specialized review tools are used)
All changes are reviewed and validated
Consistent code conventions are enforced through all product parts or modules
Code review process roles are assigned: referee, author, reviewer. One person cannot have more than one role.
Code review is done in small portions: up to 400 lines per review, up to 2 hours per day for reviewer and collect metrics to enforce that practice
A wiki of project best practices are up to date and those practices are enforced on review
Reviews are optimized:
Drop trivial changes review (e. g. some autogenerated files, etc.)
Setup focused review sessions guided by author to speedup (author comments changes and provides context for made decisions)
Involve only necessary reviewers
Author critically reviews own code before requesting a code review
Review statistics is collected and used to optimize review process
Process ensures that identified code review defects or action items are fixed
Feedback cycles are reduced by introducing relevant, intelligent comments
Code review results are reviewed and approved by project leadership team
Code review items are closed along with the story and are part of acceptance criteria
Last updated