-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pt] Added formal rule ID:GASTAR_DESPENDER_DESEMBOLSAR #11201
Conversation
WalkthroughA new rule group Changes
Possibly related PRs
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
languagetool-language-modules/pt/src/main/resources/org/languagetool/rules/pt/style.xml (3)
4118-4120
: Consider removing or reformatting the ChatGPT comment.While it's good to acknowledge external tools, inline comments about AI usage might not be suitable for production code. Consider moving this information to the PR description or commit message instead.
4139-4139
: Consider adding more modern currency terms.The financial terms list is comprehensive but could benefit from adding more modern terms like:
- Popular cryptocurrencies (e.g., "cardano", "dogecoin", "solana")
- Digital payment terms (e.g., "stablecoin", "wallet", "nft")
Also applies to: 4164-4164
4169-4171
: Add more complex test examples.The current examples are good but basic. Consider adding more complex cases to verify the rule's behavior:
- Multiple auxiliary verbs (e.g., "tinha estado gasto")
- Negations (e.g., "não tinha gasto")
- Interrupted patterns (e.g., "tinha realmente gasto")
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
languagetool-language-modules/pt/src/main/resources/org/languagetool/rules/pt/style.xml
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Analyze (python)
- GitHub Check: Analyze (java-kotlin)
🔇 Additional comments (2)
languagetool-language-modules/pt/src/main/resources/org/languagetool/rules/pt/style.xml (2)
4136-4137
: Review the token skip distance.The
skip='4'
attribute allows up to 4 words between tokens, which might be too permissive and could lead to false positives. Consider reducing this value or adding more specific constraints to prevent incorrect matches.
4118-4172
: Verify integration with existing rules.Let's check for similar rules in other languages and potential conflicts:
✅ Verification successful
Rule integration verified successfully.
The "gastar → despender/desembolsar" rule is properly integrated with existing rules in the Portuguese language module, with no conflicts found. The implementation includes comprehensive antipatterns and follows the established pattern structure.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Check for similar rules in other language modules echo "Searching for similar rules in other language modules..." find . -name "style.xml" -not -path "*pt/*" -exec grep -l "gastar\|despender\|desembolsar" {} \; # Check for potential rule conflicts in Portuguese module echo "Checking for potential rule conflicts..." rg -A 5 "gastar|despender|desembolsar" "languagetool-language-modules/pt/src/main/resources/org/languagetool/rules/"Length of output: 18014
Hi @marcoagpinto! I think this fits better in the pt-PT file only. Would you mind moving it there? Thank you :D |
Sure. Thanks for the feedback. Give me a few minutes. 😛 😛 😛 😛 |
Ahhhh… I feel really great with this new rule.
Summary by CodeRabbit