Skip to content

Latest commit

 

History

History

crate_wide_allow

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

crate_wide_allow

What it does

Checks for use of #![allow(...)] at the crate level.

Why is this bad?

Such uses cannot be overridden with --warn or --deny from the command line. They can be overridden with --force-warn or --forbid, but one must know the #![allow(...)] are present to use these unconventional options.

Example

#![allow(clippy::assertions_on_constants)] // in code

Use instead:

// Allow `clippy::assertions-on-constants` in Cargo.toml. See:
// - https://doc.rust-lang.org/cargo/reference/manifest.html#the-lints-section
// - https://doc.rust-lang.org/clippy/configuration.html#lints-section-in-cargotoml