Skip to content

chore: fix all clippy issues and strengthen CI lint coverage #481

Description

@karthiknadig

Problem

cargo clippy --workspace --all-targets --all-features -- -D warnings fails on test code that the CI lint job never checks, because lint.yml runs cargo clippy --all-features without --all-targets and only on Linux. Issues found:

  • crates/pet-hatch/src/lib.rs (x4) — needless_borrows_for_generic_args (norm_case(&path.join(...)))
  • crates/pet/tests/jsonrpc_server_test.rs:70needless_return
  • crates/pet/tests/e2e_performance.rs:764expect_fun_call (.expect(&format!(...)))

These never failed CI because the lint job skips test targets.

Fix

  • Fix all of the above clippy findings.
  • Strengthen the CI lint job (lint.yml) to run cargo clippy --workspace --all-targets --all-features -- -D warnings so test code and feature-gated code are linted.
  • Run clippy on both Linux and Windows runners so platform-gated code is covered.

Context

Discovered while fixing #432.

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