Fix grammar in custom rule docs - #1295
Conversation
Corrected grammar in the documentation regarding custom rules return values.
Remove unnecessary empty line at the beginning of the document.
|
@stvnzhou86 is attempting to deploy a commit to the ealush's projects Team on Vercel. A member of the Team first needs to authorize it. |
Review Summary by QodoFix grammar in custom rule documentation
WalkthroughsDescription• Fix grammar: "return" to "returns" in custom rules documentation • Correct verb conjugation for function return description Diagramflowchart LR
A["Documentation File"] -- "Grammar correction" --> B["'return' → 'returns'"]
B -- "Updated" --> C["Custom Rules Docs"]
File Changes1. website/docs/enforce/creating_custom_rules.md
|
Code Review by Qodo
1. Versioned docs grammar mismatch
|
There was a problem hiding this comment.
Code Review
This pull request corrects a grammatical error in the documentation for creating custom rules. The reviewer suggested further enhancements to the sentence for better clarity and consistency, including the use of backticks for property names and code snippets, and adding a missing indefinite article.
| ## Custom rules return value | ||
|
|
||
| Rules can either return boolean indicating success or failure, or an object with two keys. `pass` indicates whether the validation is successful or not, and message provides a function with no arguments that return an error message in case of failure. Thus, when pass is false, message should return the error message for when enforce(x).yourRule() fails. | ||
| Rules can either return boolean indicating success or failure, or an object with two keys. `pass` indicates whether the validation is successful or not, and message provides a function with no arguments that returns an error message in case of failure. Thus, when pass is false, message should return the error message for when enforce(x).yourRule() fails. |
There was a problem hiding this comment.
While the grammar fix for 'returns' is correct, there are several other opportunities to improve the clarity and consistency of this sentence. Specifically: add the indefinite article 'a' before 'boolean', and use backticks for property names (message, pass), literal values (false), and code snippets (enforce(x).yourRule()) to match the style used elsewhere in the documentation.
| Rules can either return boolean indicating success or failure, or an object with two keys. `pass` indicates whether the validation is successful or not, and message provides a function with no arguments that returns an error message in case of failure. Thus, when pass is false, message should return the error message for when enforce(x).yourRule() fails. | |
| Rules can either return a boolean indicating success or failure, or an object with two keys. `pass` indicates whether the validation is successful or not, and `message` provides a function with no arguments that returns an error message in case of failure. Thus, when `pass` is `false`, `message` should return the error message for when `enforce(x).yourRule()` fails. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughDocumentation clarifies that custom rules may return either a boolean or an object with ChangesDocumentation Clarification
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Fixes a small grammar issue in the custom rule documentation:
function ... return->function ... returnsThis is a documentation-only change.
Summary by CodeRabbit
passandmessagefunction) and error message generation behavior.