Skip to content

Per-crate-type [lint] configuration #15046

Open
@Nemo157

Description

@Nemo157

Problem

As mentioned in the original tracking issue

Some lints are crate specific, like only wanting missing_docs and missing_debug_implementations for [lib]s (#12115 (comment))

Having to add an #![allow(missing_docs)] to every test crate because they don't have any crate-level docs is annoying. The alternative of still using an in-code #![warn(missing_docs)] in src/lib.rs misses out on the benefits of a workspace-level lint config, like forgetting to add it to a new crate.

Proposed Solution

Being able to somehow configure different sets of lints for lib, bin, test, etc. crates.

Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintsArea: rustc lint configurationC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions