Code reviews can be a daunting challenge for developers. It’s hard to know what to look for in a given pull request (PR). I want to share some tips that I have learned from other LivingSocial engineers.
Questions you should be asking about the PR
- Do you understand what the PR does?
- Does it have a clear commit message?
- If it’s a big new feature, is it covering edge cases?
- Does the entire test suite code pass?
- Run the full test suite, and not only the one controller that changes
- This way if you need to rollback your commit, you don’t have to shift through multiple commits to get to yours
- If all goes to shits, what are the steps the merger should take to undo this shenanigans
This is a good start for effective code reviews and merging pull requests. These steps have helped us find bugs, code smells, and fast cycles for a better engineering experience.