Tips for requesting a code review
- Keep the review small, and related to one bug fix or one piece of functionality.
- Provide an overview of any technical design decisions.
- Provide a link to the ticket for reference to the requirements, visual designs, and documentation.
- Re-read the requirements and ensure that all requirements are met before submitting for review.
- Be sure new and existing tests pass - unit testing, automation and manual testing.
- Run linting checks and fix errors and warnings if they are not automated.
- Assign your pull request a reviewer, or tell your team.
- Update your ticket status if needed.
- Be prepared to talk about the work.
Tips for reviewing code
- It is not QA, but depending on the changes, checkout the branch, build the project, run the tests, use the feature. Hopefully some of this is automated.
- Check requirements and designs, and review front end, does the front end code actally render? Again, hopefully automated tests build this confidence.
- If there are bugs, record them in a comment.
- Look for most important improvements to code design.
- Look for major diversions from coding standards.
- Test code is as important as functional code, so review the tests code.
- If you have a lot of comments to make on this code review, choose the most important comments only.
Tips for writing the code review
- Remember to praise good this, particularly if the engineer is junior.
- Be polite, use manners.
- Refer directly to coding guidelines docs for code style/standards.
- Refer to the code not the author.
- Treat people with respect.
- Remember there is more than one approach to a solution.
- Remember there is collective ownership of code in a team.
Also see Code Review Principles