Skip to content

Inconsistent feature naming #17250

Description

@joshtriplett

What it does

We could lint (at a warn-by-default level) if the set of non-deprecated features are not consistently named, such that some use _ and some use -.

This should wait until we have deprecated lints, and deprecated lints should be ignored for the consistency check, so that people can have compatibility features.

Advantage

This would encourage consistency in naming.

Drawbacks

It's a style matter, so it's likely to be divisive. Some people will appreciate lints on style matters, and others may find them annoying.

Example

[features]
my_feature = ["dep:a"]
my-other-feature = ["dep:b"]

Could be written as:

[features]
my-feature = ["dep:a"]
my-other-feature = ["dep:b"]

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-new-lintArea: new lintS-blocked-externalStatus: ❌ blocked on something out of the direct control of the Cargo project, e.g., upstream fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions