Skip to content

fix(plugins): clippy::similar_names in overlay.rs test helper — CI all-targets check fails #3156

@bug-ops

Description

@bug-ops

Description

A new `clippy::similar_names` violation was introduced in the `zeph-plugins/src/overlay.rs` test module as part of PR #3145. The function parameter `plugins_dir` and local variable `plugin_dir` are flagged as too similar by clippy when running with `--all-targets`.

This causes `cargo clippy --all-targets --workspace --features full -- -D warnings` to fail, which blocks CI pipeline on the all-targets gate.

Reproduction Steps

  1. Run `cargo clippy --all-targets --workspace --features full -- -D warnings`
  2. Observe error in `crates/zeph-plugins/src/overlay.rs:348`

Expected Behavior

`cargo clippy --all-targets` passes with zero warnings.

Actual Behavior

error: binding's name is too similar to existing binding
   --> crates/zeph-plugins/src/overlay.rs:348:13
    |
348 |         let plugin_dir = plugins_dir.join(name);
    |             ^^^^^^^^^^
    |
note: existing binding defined here
   --> crates/zeph-plugins/src/overlay.rs:347:29
    |
347 |     fn write_plugin_overlay(plugins_dir: &Path, name: &str, overlay_toml: &str) {
    |                             ^^^^^^^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#similar_names
    = note: \`-D clippy::similar-names\` implied by \`-D warnings\`

Environment

  • Version: v0.19.1 (HEAD 00b4ef9)
  • Features: full

Fix

Rename either the parameter `plugins_dir` to `dir` or the local `plugin_dir` to `entry` (or similar) in the `write_plugin_overlay` test helper in `crates/zeph-plugins/src/overlay.rs`.

Metadata

Metadata

Assignees

Labels

P2High value, medium complexitybugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions