Every assert of an empty collection prints it on failure, as Rust 1.99's clippy::assert_is_empty asks - #291
Conversation
…9's clippy::assert_is_empty asks Clippy 1.99 adds assert_is_empty to pedantic, and CI's stable toolchain took it, so every job that compiles the tests refused 45 `assert!(x.is_empty())` calls. Each now carries a message that prints the collection, which is what the lint wants and what a failing run needs; the one asserting non-emptiness says which list was empty.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 42 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (18)
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 |
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (69.52%) is below the target coverage (100.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #291 +/- ##
==========================================
- Coverage 94.15% 94.01% -0.14%
==========================================
Files 46 46
Lines 20547 20608 +61
==========================================
+ Hits 19345 19374 +29
- Misses 1202 1234 +32 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
One engine change since 1.23.0. supply-chain no longer hands an npm git dependency to guarddog, which asked npm for it and got a 404, so a repository depending on its own package by git exited 2 on every run. Each git dependency in a package.json's dependencies is held to the same first-party owner rule and git ls-remote check as a uv git source, against the commit bun.lock or package-lock.json records; a tag its #<ref> names must point at that commit. One with no recorded commit is refused by name, and guarddog reads the rest of the manifest (#290). A git remote spelled as an option (starting with -) is now refused for uv and npm alike, and git ls-remote takes the remote after --, so a manifest cannot hand git an --upload-pack command (#290). The tests assert every empty collection with a message that prints it, as Rust 1.99's clippy::assert_is_empty asks (#291). A consumer taking the pin to v1.24.0 needs no change. A repository whose package.json depends on a git source under another owner, or on one no lock pins, now fails the supply-chain section by name where it was could-not-look.
Rust 1.99's clippy adds
assert_is_emptyto pedantic. CI's stable toolchain picked it up, so every job that compiles the tests now fails on 45assert!(x.is_empty())calls. This includes #290'sscan engine,pre-commitandprekjobs, and it will hitmainon its next run.Each call now has a message that prints the collection, so a failing run shows what was in it. With a message, the lint no longer fires. The one assertion that a list is not empty says which list was empty.
Verified:
cargo clippy --all-targets --all-features -D warningsis clean on 1.99.0, and all 29 test suites pass.