You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#2096 (Rust codebase had drifted from cargo fmt/clippy conventions). That issue's cargo fmt half is fixed (one-time repo-wide reformat + cargo fmt --check CI gate). This issue tracks the remaining cargo clippy half.
Context
As of #2096's investigation, cargo clippy reports 98 warnings against crates/codegraph-core, and nothing in CI runs clippy today.
Unlike cargo fmt (a purely mechanical, semantics-preserving reformat — safe to apply repo-wide in one automated pass, which #2096 already did), clippy warnings often require actual judgment per-lint: some are genuine simplifications, some flag idiomatic-but-flagged patterns, and a few can be legitimate false positives worth an #[allow(...)] with a comment rather than a code change. Blindly "fixing" all 98 in one pass risks introducing subtle behavior changes without adequate review, so it wasn't folded into #2096.
Suggested approach
Run cargo clippy --workspace and triage the 98 warnings by lint category — likely a handful of #[allow]-worthy categories dominate the count rather than 98 independent issues.
Fix (or explicitly allow with justification) each category, verifying behavior via cargo test after each batch — probably worth splitting into a few smaller PRs by category rather than one large diff, given the review burden the count implies.
Found while working on
#2096 (Rust codebase had drifted from cargo fmt/clippy conventions). That issue's
cargo fmthalf is fixed (one-time repo-wide reformat +cargo fmt --checkCI gate). This issue tracks the remainingcargo clippyhalf.Context
As of #2096's investigation,
cargo clippyreports 98 warnings againstcrates/codegraph-core, and nothing in CI runs clippy today.Unlike
cargo fmt(a purely mechanical, semantics-preserving reformat — safe to apply repo-wide in one automated pass, which #2096 already did), clippy warnings often require actual judgment per-lint: some are genuine simplifications, some flag idiomatic-but-flagged patterns, and a few can be legitimate false positives worth an#[allow(...)]with a comment rather than a code change. Blindly "fixing" all 98 in one pass risks introducing subtle behavior changes without adequate review, so it wasn't folded into #2096.Suggested approach
cargo clippy --workspaceand triage the 98 warnings by lint category — likely a handful of#[allow]-worthy categories dominate the count rather than 98 independent issues.cargo testafter each batch — probably worth splitting into a few smaller PRs by category rather than one large diff, given the review burden the count implies.cargo clippy --workspace -- -D warnings(or a more targeted lint-level gate) to the existingrust-checkCI job once the crate is clean, mirroring how Rust codebase has drifted from cargo fmt/clippy conventions (~1152 diff hunks, 98 warnings), not CI-enforced #2096 addedcargo fmt --checkto the same job.