-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Code Review Standards for External Contributors (#15)
* adds a Code Review Standards for External Contributors section * add dividing lines * clean up * update the Code Line Limit point with suggestions * add section about unsafe code
- Loading branch information
1 parent
1fc7f3e
commit e1906db
Showing
2 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Code Review Standards for External Contributors | ||
|
||
1. __Code Line Limit__: Pull requests should aim to not exceed 500 lines of additions. This helps to ensure that changes are small and easy to review, making it less likely for bugs to be introduced and easier to understand the changes. It also keeps the pull requests manageable in size and reduces the time needed for reviewing and approving. | ||
|
||
2. __Code Quality__: Code should be clean, well-organized, and easy to read. It should follow the existing coding style and conventions used in the project. This makes the codebase consistent and easy to understand, which will help to maintain the project over time. | ||
|
||
3. __Comments__: Code should be well-documented, providing explanations for the purpose, design, and reasoning of the code. Comments assist in clarifying the intent of the code, making it easier for others to work with and understand, even if they were not familiar with it previously. They also aid in making sure that others can comprehend the modifications made and how they fit into the overall project. | ||
|
||
4. __Test Coverage__: All new code should be accompanied by unit tests that thoroughly exercise the new functionality. This helps to ensure that the code is working as intended and will continue to work correctly in the future. | ||
|
||
5. __Security__: All code should be checked for potential security vulnerabilities. It is important to make security a top priority and regularly check and test code for any potential vulnerabilities. | ||
|
||
6. __Safety > Performance__: Correctness of code must be guaranteed before `unsafe` code will be considered for review. Requests for the inclusion of `unsafe` code should be accompanied by benchmarks that demonstrate a measurable performance improvement, and/or code comments that clearly explain why the `unsafe` code is necessary before the code is considered for review. | ||
|
||
7. __PR Submission__: When submitting a pull request, the contributor should provide a clear explanation of the changes made and their motivations behind the proposed modifications. It's recommended to include links to any related open issues in the PR description to make it easy for reviewers to understand the context and the problem that the code is trying to solve. | ||
|
||
8. __Sign Off__: All pull requests from external contributors will need to be signed off by at least two internal contributors before they can be merged. This helps to ensure that changes are properly reviewed and that the quality of the codebase is maintained. It also allows for more experienced developers to mentor less experienced ones and help improve their contributions. | ||
|
||
9. __Compliance__: All contributions must adhere to the project's open-source license and the contributor must agree to the terms of the license before submitting their code. This helps to ensure that the project stays in compliance with legal and ethical guidelines, and protects the rights of all parties involved. | ||
|
||
By following these standards, external contributors can help to ensure that their code is of high-quality and easy to review. Adhering to these standards makes the project more reliable, sustainable, and maintainable in the long run, benefiting the project, community and the contributors. |