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
{{ message }}
Repository navigation
clippy: two pre-existing -D warnings failures (block local validation with strict clippy) #532
Two warnings fire under `cargo clippy --all-targets -- -D warnings` on current `develop` (verified identical before any of the open PRs), failing strict clippy locally. CI may pass with a different toolchain, but per AGENT.md this command is the project lint bar.
Findings
Duplicated attribute — `src/index/ast.rs:6`: module-level #![cfg(feature = "tree-sitter")] while the declaration in `src/index/mod.rs:7` is already cfg-gated.
Collapsible else-if — `src/main.rs` (~line 1161–1186, shifts between branches): an `else { if … }` block can be collapsed to `else if`.
Suggested fix
Remove the inner `#![cfg(...)]` attribute from `ast.rs` (or drop the gate on the `mod` declaration — pick one).
Collapse the else-if in `main.rs`.
Trivial, no behavior change — good first cleanup PR so toolchains matching CI don't keep reporting drift.
→ clean on rustc/cargo 1.97.1 — neither finding reproduces on the current toolchain.
The reported code pattern still exists though (src/index/ast.rs carries the inner #![cfg(feature = "tree-sitter")] while the mod ast; declaration in src/index/mod.rs is already cfg-gated), so leaving this open as a minor cleanup: removing the inner attribute would make older clippy versions happy too.
Activity
ajianaz commentedon Aug 27, 2026
Verified on develop after #528–#531 landed (4182466):
→ clean on rustc/cargo 1.97.1 — neither finding reproduces on the current toolchain.
The reported code pattern still exists though (
src/index/ast.rscarries the inner#![cfg(feature = "tree-sitter")]while themod ast;declaration insrc/index/mod.rsis already cfg-gated), so leaving this open as a minor cleanup: removing the inner attribute would make older clippy versions happy too.