Repository navigation
fix: add workspace clippy lint enforcement and fix all violations - #232
Merged
Merged
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace unwrap/expect on RwLock guards with unwrap_or_else(poison recovery) in non-Result fns and map_err(?) in Result-returning fns. Fix indexing_slicing in write_header via get_mut().ok_or_else(), and arithmetic_side_effects in FileBackend via checked_mul/checked_add. Replace order.len()-1 subtraction in touch() with back()==Some(&id). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…te_blob (num_pages >= 1 guaranteed)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…acts Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…atcher, functions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…poral, repl, and FFI Fix all remaining deny-level clippy lint violations across: - query/datalog/evaluator.rs: RwLock expect→map_err, indexing→.get()/.first() - query/datalog/executor.rs: panic→Err, unwrap→map_err, indexing with allow - query/datalog/parser.rs: indexing→.get() with String errors - query/datalog/optimizer.rs, rules.rs, stratification.rs: unwrap→ok_or_else - db.rs: expect→map_err, cast u64→i64 via .cast_signed() - wal.rs: cast truncation via try_from, unwrap→ok_or_else - temporal.rs: unwrap→ok_or_else - repl.rs: unwrap→if-let patterns - minigraf-c/src/lib.rs: unwrap→match for FFI lock handling Zero clippy errors remain. 829 tests passing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
arithmetic_side_effects, unreachable, and missing_errors_doc are too noisy for production code (parser index arithmetic, exhaustive match arms, every Result-returning fn). Set to allow since the pre-push hook uses -D warnings which would escalate them to deny anyway. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
[workspace.lints.clippy]in root Cargo.toml with deny-level enforcement for:unwrap_used,expect_used,panic,todo,unimplemented,cast_possible_truncation,cast_possible_wrap,cast_sign_loss,indexing_slicing[lints] workspace = true#![cfg_attr(test, allow(...))]at each crate rootunwrap()/expect()→?/.map_err()/.ok_or_else();panic!()→return Err()as i64/as u32→.cast_signed()/try_from().get().ok_or_else()or#[allow]with invariant comment.lock().unwrap()→.lock().map_err(|_| anyhow!("lock poisoned"))?unwrap()→matchwith error-setting fallback (can't use?in extern "C")Test plan
cargo clippy --libproduces zero errorscargo clippy --libproduces zero warningscargo test --workspacepasses (829 tests, 0 failures)cargo fmt --checkpasses🤖 Generated with Claude Code