Before you ask others for code review, create pull request properly, check everything in general to save others time and firstly do a self code review.
- [x] I chose appropriate labels and I updated pull request description
- [x] I updated my branch to target branch and I resolved all git conflicts
- [x] I updated relevant docs, e.g. Changelog, Readme, API
- [x] CI processes passed successfully
- [x] I checked if it meets the basic objectives and it is not overly complicated
- [x] I made sure it is easy to read, maintain and it is sufficiently tested
- [x] I got rid of the liners warnings and I formatted the code
- [x] The frontend or API was affected so I tested it in a browser or an API client
If we are working on a large task, it is worth doing a self code review every few commits, e.g. milestones, so that we do not have to review the whole changes at the end when we can be no longer up to date with that code.
Before asking the others for code review, it’s a good to squash all commits into one. Thanks to this, we will have a short and clear history of changes during code review. This will facilitate the reviewer’s work when he checks the fixes made.
It is important to assign itself to pull request assingess field. This allows the author to know that someone starts reviewing his code and will not make any changes during this time.
As a reviewer do a few passes. When there are serious problems in a given pass, we abandon checking the next ones until the author fixes them.
Check the general things
Check the functionality itself
Check the implementation
The extra pass is optional but strongly suggested. Finally, we can think about and propose a better, lighter, less resource-hungry or simpler solution to the problem. We can suggest a better naming convention, file structure, some design patterns or better libraries.
Generally speaking, consider the possibilities of improving the current code in terms of maintenance. It should be remembered that these are voluntary proposals, and the issue of their implementation should be agreed with the team so as not to unnecessarily extend the time of work on the task.
Depending on the experience level of the author and reviewer, this is the time and place to learn by reviewing the code.
Before you ask for review be sure that you
How to point out mistakes and at the same time not make the author feel personally attacked?