Looking for a Code Review? 4 Tips to Set Yourself Up For Success
A lot goes into making an effective code review. It starts with setting the appropriate expectations between the author and the reviewer(s) and ends with the effort the author puts in. This article is a list of helpful questions to ask yourself as a Pull Request author.
1. What are you expecting from each reviewer
Each of the following is important, but it's not reasonable to expect that one single reviewer will do them all. It's important as both the code author and reviewer to clarify the role expected by each reviewer.
- A semantic or style review?
- A quick check for simple errors?
- A review of your code layout design decisions?
- A review of the business logic?
- A review of the (missing) error handling?
- A review of the scalability implications of your choices?
- A check for security vulnerabilities?
- A review of your comments & confluence docs?
2. What level of diligence are you expecting to get
- A pairing session?
- Asynchronous 5 minutes? 15 minutes?
- Review of each line of code changed?
- Review the efficacy of each unit test?
- Check out of the Pull Request locally and run it?
- Check out of the Pull Request locally and tracing through of related parts of the code?
- Reading the sprint task or Product Requirements and consideration of the use cases?
- Reading the sprint task or Product Requirements and consideration of missed use cases?
- Reading the sprint task or Product Requirements and consideration of the landscape of possible data inputs?
- Review the proper use of any new dependent modules?
3. When do you want to get feedback?
- Before End of Sprint
- Do you expect a back and forth?
4. What have you done to improve chances of a good review?
- Did you add useful comments?
- Did you review the PR yourself and add comments where applicable?
- Did you limit the size of the change to a small enough amount? See Tip #3 in this checklist.
- Did you describe your goal for the change in the description?
- Did you run the unit tests & linters before requesting review?
- Did you clarify the state of the code (draft, WIP, ready for merge)?