Pull Request Reviews
Information related to reviewing Pull Requests.
Reviewing Pull Requests
The main goal of a review should be to verify the following, and to provide constructive feedback:
The code is self-documenting.
The code is well written.
The code is styled properly.
The pull request itself is properly formatted – refer to the
Git
section of the bible.
Pull requests should be only accepted if all categories are satisfied (with an additional judgment call for any other comments), and requesting changes should be done liberally – rather than accepting and asking to make changes before merging.
Self Documenting Code
Variables should be well named. Consider the following two snippets:
The same should be done for functions:
Comments should be used liberally, especially for complex or unusual snippets:
There is no reason to have code that is difficult to understand.
Well-written code
Whether or not code is well-written is up to the discretion of the reviewer, but there are certain guidelines to keep in mind.
Avoid Unnecessary Computations:
Avoid Excessive Variable Declarations
Avoid Excessive Commenting
Code Styling
For python
, refer to PEP8.
For react
, refer to the Airbnb Style Guide.
For javascript
, refer to the Airbnb Style Guide.
Last updated