Re:Disable comments make static analysis tools worse
by chrismorgan on Tuesday July 06, 2021 @01:42AM
(#27744575)
> As far as I know, there is no static analysis tool out there that has disable comments and allows making some rules not disableable (please let me know if you know one!).
Rust has four levels for lints: allow, warn, deny and forbid. You can nest these to override the level inside an item, except for forbid, which means “deny, and don’t allow any overriding”. This is most commonly seen with #[forbid(unsafe_code)].
Rust has four levels for lints: allow, warn, deny and forbid. You can nest these to override the level inside an item, except for forbid, which means “deny, and don’t allow any overriding”. This is most commonly seen with #[forbid(unsafe_code)].
See https://doc.rust-lang.org/rustc/lints/levels.html for more info.