Skip to content

chore: remove redundant -D clippy::X flags from clippy runner #2

Description

@josecelano

The torrust-linting clippy runner (src/linters/clippy.rs) currently passes these -D flags on the command line:

-D clippy::correctness
-D clippy::suspicious
-D clippy::complexity
-D clippy::perf
-D clippy::style
-D clippy::pedantic

These flags were the primary enforcement mechanism when no [workspace.lints] section existed in consuming projects (e.g. torrust-tracker). However, torrust-tracker has now migrated to [workspace.lints.clippy] with all = "deny" (see torrust/torrust-tracker#1786 / PR #1914), which covers all of these groups and more.

Options

  1. Remove the -D clippy::* flags entirely — consuming repos rely on their own [workspace.lints] for clippy enforcement. The linter tool remains useful for the other linters (markdown, yaml, toml, cspell, rustfmt, shellcheck).

  2. Keep them as a safety net — some repos may not have [workspace.lints] configured. The flags are idempotent (harmless redundancy), so keeping them works but adds confusion.

  3. Gate them — only pass the flags when the consuming project does not have [workspace.lints.clippy]. This is more complex but avoids both gaps and redundancy.

Scope

  • Remove or gate the -D clippy::correctness, -D clippy::suspicious, -D clippy::complexity, -D clippy::perf, -D clippy::style, -D clippy::pedantic flags in src/linters/clippy.rs
  • Update any related documentation
  • Verify with linter all on torrust-tracker (the main consumer)

Related

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions