Say non-negative in the shared positive-count range error message#4184
Say non-negative in the shared positive-count range error message#4184AlisinaDevelo wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThe shared positive-long validation message now says “must be non-negative” to match its ChangesCount validation wording
Estimated code review effort: 1 (Trivial) | ~2 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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 |
Signed-off-by: AlisinaDevelo <Alisinakarimi.2003@gmail.com>
034b94b to
7035710
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## unstable #4184 +/- ##
=========================================
Coverage 76.83% 76.83%
=========================================
Files 162 162
Lines 81455 81455
=========================================
+ Hits 62585 62588 +3
+ Misses 18870 18867 -3
🚀 New features to boost your workflow:
|
getPositiveLongFromObjectOrReply validates against [0, LONG_MAX] but its default error says "value is out of range, must be positive", which reads as excluding 0 — yet 0 is accepted:
All five call sites of the default message (LPOP/RPOP, SPOP, ZPOPMIN/ZPOPMAX, DEBUG keys/valsize) accept a non-negative count, so the wording is wrong for every one of them. Change the shared default to "must be non-negative" — one change, consistent everywhere.
Updated the three ZPOPMIN/ZPOPMAX assertions in zset.tcl that pinned the old wording. list.tcl matches loosely on
*ERR*range*and set.tcl has no message assertion, so both are unaffected; the count=0 tests still pass. The stream ENTRIESREAD/ENTRIESADDED messages are separate literals (#4145/#4146) and out of scope.Reported by @power-edge. Fixes #4150.