docs(guardrails): enforce JSDoc on every new or modified function#3143
docs(guardrails): enforce JSDoc on every new or modified function#3143PierreBrisorgueil merged 9 commits intomasterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the repository’s AI guardrails documentation to require JSDoc headers on every new or modified function, and records the recurring mistake in ERRORS.md to reinforce the practice.
Changes:
- Add an
ERRORS.mdentry capturing the recurring “missing JSDoc on new functions” mistake. - Add an always-on guardrail in
.github/copilot-instructions.mdrequiring JSDoc (description,@param, and@returnsguidance).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
ERRORS.md |
Adds a new recurring-mistake entry about missing JSDoc headers on added functions. |
.github/copilot-instructions.md |
Adds a new guardrail requiring JSDoc on every new/modified function. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3143 +/- ##
=======================================
Coverage 89.85% 89.85%
=======================================
Files 52 52
Lines 1163 1163
Branches 233 233
=======================================
Hits 1045 1045
Misses 107 107
Partials 11 11 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@copilot review |
|
@PierreBrisorgueil I've opened a new pull request, #3144, to work on those changes. Once the pull request is ready, I'll request review from you. |
|
@copilot review |
|
@PierreBrisorgueil I've opened a new pull request, #3145, to work on those changes. Once the pull request is ready, I'll request review from you. |
|
@copilot review |
|
@PierreBrisorgueil I've opened a new pull request, #3146, to work on those changes. Once the pull request is ready, I'll request review from you. |
…own formatting
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📝 WalkthroughWalkthroughTwo documentation files were updated to establish a new policy requiring JSDoc headers for all new or modified functions, including Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@ERRORS.md`:
- Line 14: The ERRORS.md entry currently says "functions: added functions
without JSDoc header -> always add JSDoc (description + `@param` + `@returns`)"
which contradicts the guardrail; update this entry to reference "new or modified
functions" instead of "added functions" so it matches the guardrail wording
(e.g., change the phrase "added functions" to "new or modified functions" while
preserving the rest of the guidance and the JSDoc requirements).
Summary
copilot-instructions.mdguardrails: every new or modified function must have a JSDoc header (description +@param+@returns)ERRORS.mdto reinforce the lesson from PRs where functions were added without documentationWhy
Recent PRs introduced functions without JSDoc headers. This rule makes it an always-on constraint for all AI interactions rather than a post-hoc catch.
Scope
Summary by CodeRabbit