My role involves reviewing code written by different members of my team, which is an important process in the software delivery lifecycle. In certain cases, code reviews turn into gatekeeping which does not deliver the intended value for the process
The reason for code reviews
- Get a shared understanding of the code submitted – an opportunity to share, learn and collaborate
- Find opportunities to improve the code and what it is doing – refactoring
- Find edge cases that may not have been covered
- Verify that the code does what is expected
I just thought I would share my PR review approach and I hope it may help others here
- Read through the code changes across the files in the GitHub/GiLab or version control UI – this helps me get a sense of files which should not be there, too many files, too few files etc
- Pull the PR locally on my machine – Jetbrains IDEs and VS Code have pull request views and functionality if you are not a cli guru like yours truly
- Run the code and test the features as documented both happy path and some random abrupt paths
The improvements we are going to add to our projects (still looking for ideas here)
- Automated code checking for formatting and linting
I tend to use Firefox developer edition (set to always start in private mode) for web stuff to view it in a clean browser. Chrome is the new Internet Explorer 6 (the most painful growth phase of the web)
What is your code review workflow, what tips and tricks have you used to make it smoother and more streamlined?
UPDATE 1: November 4, 2021 – excellent reference on by Chelsea Troy https://chelseatroy.com/2019/12/18/reviewing-pull-requests/