Developers working on CSE projects should conduct peer code reviews on every pull request (or check-in to a shared branch).
Code reviews is a way to have a conversation about the code where participants will:
- Improve code quality by identifying and removing defects before they can be introduced into shared code branches.
- Grow by learning from each other about unfamiliar design patterns or languages among other topics, and even break some bad habits.
- Develop a shared understanding of the project's code.
- Process Guidance: General
- Pull Requests
- Qualified PRs
- Reflect well-defined, concise tasks
- Compact in content
- Guidelines
- SLAs for code reviews
- Manage tasks pending for review
- Leverage code review tools
- Measuring code review process
- Process Guidance: Authors
- Add relevant reviewers
- Address comments
- Resolve if change has been made
- Provide reason for "won't fix"
- Discuss comments in the review
- Track progress
- Process Guidance: Reviewer
- Focus
- Correctness of business logic
- Correctness of tests
- Readability and maintainability
- Checklist of common errors
- General guidance
- First design pass
- Code quality pass
- Focus
- Evidence and Measures
- Evidence
- Branch policies
- Builds include linters and run unit tests
- Bug work items
- Update code review checklist
- Improve skills as code reviewers
- Measures
- Collect metrics e.g. Defect Removal Efficiency, Time metrics, Lines of Code
- Manual tracking vs. AzDO dasboards
- Evidence
- Language Specific Guidance
- FAQ
- Resources