-
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] Fixed and removed "temp_off" from rule ID:PARA_NADA_DESNECESSARIAMENTE #10908
base: master
Are you sure you want to change the base?
Conversation
Warning Rate limit exceeded@marcoagpinto has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 22 minutes and 10 seconds before requesting another review. ⌛ 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. WalkthroughThe pull request modifies the 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
🧹 Outside diff range and nitpick comments (2)
languagetool-language-modules/pt/src/main/resources/org/languagetool/rules/pt/style.xml (2)
3622-3629
: Antipattern addition: Approved with a suggestionThe addition of the antipattern is a good improvement to prevent false positives. It correctly identifies cases where "para nada" is used appropriately in conjunction with negation and specific verbs.
Consider adding a comment explaining the purpose of this antipattern for better maintainability. For example:
<antipattern> + <!-- This antipattern prevents false positives when "para nada" is used appropriately with negation and specific verbs --> <token>não</token> <token regexp='yes' inflected='yes'>conceder|concluir|determinar|esperar|finalizar|obter</token> <!-- Exceptions for below --> ... </antipattern>
3631-3631
: Existing pattern: Approved with a suggestion for future improvementThe existing pattern remains unchanged and works well in conjunction with the new antipattern to improve the rule's accuracy.
For future improvements, consider breaking down the long list of verbs into semantic groups or categories. This could make the rule more maintainable and easier to update. For example:
<token regexp='yes' inflected='yes'> <!-- Action verbs --> adjudicar|administrar|aplicar|arranjar|assentar|atuar|... | <!-- Cognitive verbs --> analisar|antecipar|avaliar|considerar|decidir|... | <!-- Communication verbs --> explicar|persuadir|reafirmar|reiterar|... </token>This structure would make it easier to add, remove, or modify verbs within specific categories.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
- languagetool-language-modules/pt/src/main/resources/org/languagetool/rules/pt/style.xml (1 hunks)
🔇 Additional comments (2)
languagetool-language-modules/pt/src/main/resources/org/languagetool/rules/pt/style.xml (2)
3620-3631
: Summary: Changes approved with minor suggestionsThe modifications to the 'PARA_NADA_DESNECESSARIAMENTE' rule effectively address the PR objectives:
- The rule has been activated by removing the 'temp_off' attribute.
- An antipattern has been added to prevent false positives.
- The existing pattern remains unchanged, maintaining its intended functionality.
These changes should improve the accuracy of the language tool for detecting unnecessary uses of "para nada" while avoiding false positives in valid contexts.
The suggestions provided (adding a comment to the antipattern and considering a restructure of the verb list in the future) are aimed at improving maintainability and do not affect the current functionality of the rule.
3620-3620
: LGTM: Rule activation approvedThe removal of
default="temp_off"
from the rule declaration effectively activates the rule, which aligns with the PR objective of fixing and removing 'temp_off' from this rule.Let's verify that this is the only occurrence of 'temp_off' for this rule in the file:
✅ Verification successful
Verification successful: No remaining 'temp_off' attributes found
The
default="temp_off"
attribute has been successfully removed from the rulePARA_NADA_DESNECESSARIAMENTE
. No remaining instances oftemp_off
are present inlanguagetool-language-modules/pt/src/main/resources/org/languagetool/rules/pt/style.xml
.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for any remaining 'temp_off' attributes for the PARA_NADA_DESNECESSARIAMENTE rule rg --type xml 'id=.PARA_NADA_DESNECESSARIAMENTE.*temp_off' languagetool-language-modules/pt/src/main/resources/org/languagetool/rules/pt/style.xmlLength of output: 148
Done! I have just moved it from [pt] to [pt-PT]. |
… desnecessariamente"
Heya, @susanaboatto and @p-goulart ,
Susana, the rule only gave one hit, and it was a false positive, and I have just fixed it:
RESULTS URL: https://internal1.languagetool.org/regression-tests/via-http/2024-10-01/pt-BR/result_style_PARA_NADA_DESNECESSARIAMENTE%5B1%5D.html
Thanks!
Summary by CodeRabbit
New Features
Bug Fixes