Skip to content

Allow specifying both project-wide and package-specific clippy.toml settings #7353

Open
@jplatte

Description

@jplatte

For Ruma, I would like to have both project-wide and package-specific .clippy.toml settings:

  • msrv (and import_rename once it's available) as a project-wide setting
  • Possibly a project-specific msrv override
  • disallowed_type project-specific setting to disallow HashMap / HashSet use within proc-macros

It seems like this is not currently possible, with the first .clippy.toml found in one of the parent directories of the package being checked being used for all settings. Maybe an alternative to the current filesystem hierarchy based config lookup¹ would be to only search the package dir² and the workspace root³ for clippy configuration and make any settings in the former overwrite settings from the latter?

¹ which AFAIK has proved problematic for Cargo, with some people wanting to move certain settings to Cargo.toml for better reproducability
² CARGO_MANIFEST_PATH
³ workspace_root in the cargo metadata --format-version 1 output

Metadata

Metadata

Assignees

Labels

C-an-interesting-projectCategory: Interesting projects, that usually are more involved design/code wise.E-mediumCall for participation: Medium difficulty level problem and requires some initial experience.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions