← Rule catalog

Structure · Maintainability

Item stacking several allow attributes or lints

rust_doctor::structure::stacked_allow_attribute

Keep the one exemption the item actually needs and fix what the others hide; attributes produced by cfg_attr are not counted here.

Category
Maintainability
Default level
warn
Tier
P3
Producer
Structure
Diff scope
line

Not a defect when

The item is an FFI or generated binding whose shape is dictated externally, so several related lints such as non_camel_case_types, non_snake_case and dead_code legitimately need silencing together.

What it reads

Complexity, and families of near-duplicate code.

Tier

Lowest tier: real, and rarely urgent.

The tier bounds how severe a rule may be; its category bounds the tier.

Diff scope

The changed line itself.

What --scope contextual looks at to decide whether a change caused the finding.

Change it

Turn it off, or make it blocking, without touching the code it flags:

rust-doctor --rule rust_doctor::structure::stacked_allow_attribute=off .
rust-doctor --rule rust_doctor::structure::stacked_allow_attribute=error .

Set it once in rust-doctor.toml

Other Maintainability rules