Code reviews are a critical and legitimate activity that needs time and focus.
I was thinking recently about the reviews that I was doing and created a checklist for me to adjust before submitting the comments to the pull requests.
Review:
- Check out the code and run the new tests manually, try to check if the code is handling edge cases.
- Ensure the code is covering all requirements.
- Checkout code coverage results and ensure the important parts of the code are tested.
Comments:
- When demanding changes, explain them clearly. Offer suggestions or ask questions, instead of giving a direct todo or even worse just sharing a sample code.
- Don't focus too much on the coding styles or something like making the code one-liner.
- Avoid LGTM comments if possible, if everything is right, write thanks for the work.
Reply to comments:
- Always be kind to the developer but serious with the code.
- Avoid confusing statements.
- Do not criticize or explain the architectural decision changes as a long comment, instead request a pair review and do the discussion in a verbal way, after the discussion request or try to write the decisions as a comment to make them visible to the team.
Top comments (0)