Check for intermediate values on int validator#91
Conversation
|
Warning Review limit reached
More reviews will be available in 35 minutes and 23 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthrough
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@framework/uicomponents/qml/Muse/UiComponents/validators/intinputvalidator.cpp`:
- Around line 92-94: The condition that checks for a lone negative sign "-"
currently returns Intermediate regardless of whether the configured range allows
negative values. When the range is positive-only (like [1, 10]), a lone "-"
should not be considered Intermediate since the next digit would make it
invalid. Modify the condition in the intinputvalidator.cpp file where
digits.contains(QRegularExpression("^\\-?$")) is checked to also verify that the
configured range allows negative values (by checking if the minimum allowed
value is negative). Return Intermediate only when the input is empty or when it
is a lone "-" AND the range can contain negative numbers; otherwise handle the
lone "-" as an invalid input for positive-only ranges.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 729d1841-5b02-4c2b-913f-8ca7888dbc3a
📒 Files selected for processing (2)
framework/uicomponents/qml/Muse/UiComponents/tests/intinputvalidator_tests.cppframework/uicomponents/qml/Muse/UiComponents/validators/intinputvalidator.cpp
9618aa2 to
6f958e4
Compare
Resolves: #NNNNN
The input validator should not invalidate values that are merely intermediate ones.
For example, if the input should be [5, 50], the value 2 should not be considered invalid because it can be the first digit of 20.
Also empty string should be considered intermediate values. So we can remove all digits from a field in order to insert new digits.
Build configuration
audacity: audacity/audacity/master
audacity platforms: linux_x64
musescore: musescore/MuseScore/main
musescore platforms: linux_x64