Skip to content

clippy: two pre-existing -D warnings failures (block local validation with strict clippy) #532

Description

@ajianaz

What

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

  1. 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.
  2. Collapsible else-if — `src/main.rs` (~line 1161–1186, shifts between branches): an `else { if … }` block can be collapsed to `else if`.

Suggested fix

  1. Remove the inner `#![cfg(...)]` attribute from `ast.rs` (or drop the gate on the `mod` declaration — pick one).
  2. Collapse the else-if in `main.rs`.

Trivial, no behavior change — good first cleanup PR so toolchains matching CI don't keep reporting drift.

Repro

```bash
cargo clippy --all-targets -- -D warnings
cargo clippy --all-targets --features tree-sitter -- -D warnings
```

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions