Skip to content

Commit d61d4a3

Browse files
authored
Merge pull request #1 from deathkel/add-code-review
Add code review guidelines and process
2 parents 50d71ff + 4775d5d commit d61d4a3

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-0
lines changed

CODE_REVIEW.md

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Code Review Guidelines
2+
3+
## Code Review Process
4+
5+
1. **Create a Pull Request**: When you have completed a feature or bug fix, create a pull request (PR) to the main branch.
6+
2. **Assign Reviewers**: Assign at least one reviewer to your PR. Preferably, choose someone who is familiar with the codebase.
7+
3. **Review the Code**: The assigned reviewer(s) will review the code, checking for functionality, readability, and adherence to coding standards.
8+
4. **Address Feedback**: If the reviewer(s) request changes, address the feedback and update the PR.
9+
5. **Approval and Merge**: Once the reviewer(s) approve the PR, it can be merged into the main branch.
10+
11+
## Best Practices
12+
13+
- **Write Clear and Concise Code**: Ensure your code is easy to read and understand.
14+
- **Follow Coding Standards**: Adhere to the project's coding standards and guidelines.
15+
- **Test Your Code**: Write unit tests for your code and ensure all tests pass before submitting a PR.
16+
- **Keep PRs Small**: Submit small, focused PRs that are easier to review.
17+
- **Provide Context**: Include a clear description of the changes in your PR and any relevant context.
18+
19+
## Common Issues
20+
21+
- **Lack of Tests**: Ensure your code is well-tested.
22+
- **Poor Naming Conventions**: Use meaningful and descriptive names for variables, functions, and classes.
23+
- **Inconsistent Formatting**: Follow the project's formatting guidelines.
24+
- **Large PRs**: Break down large PRs into smaller, more manageable ones.
25+
- **Lack of Documentation**: Document your code and provide comments where necessary.
26+
27+
## Examples of Good and Bad Code Reviews
28+
29+
### Good Code Review
30+
31+
- **Positive Feedback**: "Great job on this feature! The code is clean and well-organized."
32+
- **Constructive Criticism**: "I noticed a potential issue with the error handling. Could you add a check for null values?"
33+
- **Suggestions for Improvement**: "Consider using a more descriptive variable name here to improve readability."
34+
35+
### Bad Code Review
36+
37+
- **Negative Feedback**: "This code is terrible. You need to rewrite it."
38+
- **Unclear Comments**: "Fix this."
39+
- **Lack of Specificity**: "This needs improvement."
40+
41+
By following these guidelines, we can ensure a smooth and effective code review process that helps maintain the quality of our codebase.

CONTRIBUTING.md

+12
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,15 @@ Before submitting a pull request:
4747
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
4848

4949
**Happy coding**!
50+
51+
## Code Review Guidelines
52+
53+
When submitting a pull request, please follow these code review guidelines:
54+
55+
1. **Create a Pull Request**: When you have completed a feature or bug fix, create a pull request (PR) to the main branch.
56+
2. **Assign Reviewers**: Assign at least one reviewer to your PR. Preferably, choose someone who is familiar with the codebase.
57+
3. **Review the Code**: The assigned reviewer(s) will review the code, checking for functionality, readability, and adherence to coding standards.
58+
4. **Address Feedback**: If the reviewer(s) request changes, address the feedback and update the PR.
59+
5. **Approval and Merge**: Once the reviewer(s) approve the PR, it can be merged into the main branch.
60+
61+
By following these guidelines, we can ensure a smooth and effective code review process that helps maintain the quality of our codebase.

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ $app->configure('apidoc');
4646
## Documentation
4747
Check out the documentation at the [Beyond Code homepage](https://beyondco.de/docs/laravel-apidoc-generator/).
4848

49+
## Code Review Process
50+
We have a code review process in place to ensure the quality and consistency of our codebase. Please refer to the [Code Review Guidelines](CODE_REVIEW.md) for more information.
51+
4952
### License
5053

5154
The Laravel API Documentation Generator is free software licensed under the MIT license.

0 commit comments

Comments
 (0)