Skip to content

Commit 03a152f

Browse files
authoredMar 24, 2025
pages: Add coding tips (#211)
1 parent 598a95e commit 03a152f

File tree

1 file changed

+19
-10
lines changed
  • pages/opportunities/guides/contribution

1 file changed

+19
-10
lines changed
 

‎pages/opportunities/guides/contribution/index.md

+19-10
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,26 @@ should review those for each project.
4545
requests without following up or addressing review recommendations, which can
4646
impede progress.
4747

48-
- **Code Quality:** Contributors must ensure that `pre-commit` is applied in
49-
their branch before opening a pull request. Additionally, they should adhere
50-
to coding best practices, such as avoiding excessive nesting blocks, following
51-
SOLID principles, and refraining from assigning different types to the same
52-
variable. It is important to consult the project's specific coding guidelines
53-
for additional best practices.
54-
5548
- **Branch Management:** When updating a branch, contributors should follow the
5649
project's preferred approach, whether that involves using a **rebase** or a
5750
**merge commit**.
5851

59-
- **Commenting Practices:** Excessive or unnecessary comments should be avoided,
60-
as well the use of emojis in comments, as they may suggest that the content
61-
was generated entirely by an AI.
52+
- If your PR is not ready yet for review, please keep it in **draft mode**.
53+
54+
## Coding Tips
55+
56+
- Ensure that `pre-commit` is applied to your branch before opening a pull
57+
request. Run `pre-commit install` to enable pre-commit hooks, ensuring they
58+
are applied automatically before every commit.
59+
- Avoid excessive nesting. Try to keep nesting levels to **four or fewer** for
60+
better readability and maintainability.
61+
- Follow the project's specific coding guidelines. Review them regularly to
62+
ensure consistency across contributions.
63+
- Remove any unnecessary comments. In most cases, if you need to explain what
64+
your code does, it may indicate that the code is unclear or overly complex.
65+
This is also often a sign of code generated by Generative AI.
66+
- Do not use emojis in comments. This is typically seen as a red flag and may
67+
suggest improper use of AI-generated content.
68+
- Ensure there is an empty line at the end of each file. GitHub highlights
69+
missing end-of-file newlines with a red icon. Configure your IDE to
70+
automatically add this final newline.

0 commit comments

Comments
 (0)
Failed to load comments.