cargo icon indicating copy to clipboard operation
cargo copied to clipboard

Lint that feature names only use `_` / only use `-`

Open epage opened this issue 7 months ago • 0 comments

What it does

Mutually exclusive (restriction) lints to ensure all [features] table entries have consistent feature names

I'm suggesting we add both as we are not currently opinionated on this

Advantage

Help ensure consistency throughout a project

Drawbacks

docs.rs has special handling for _ prefixed lints

Example

[features]
foo-bar = []

Could be written as:

[features]
foo_bar = []

epage avatar May 22 '25 16:05 epage