From 11ad5a26a97962e76ae532f09cd64ed032a3a598 Mon Sep 17 00:00:00 2001 From: xFrednet Date: Fri, 3 Dec 2021 19:29:57 +0100 Subject: [PATCH 1/2] Add note about crate lint level attributes to pre-expansion lints --- clippy_lints/src/dbg_macro.rs | 8 ++++++++ clippy_lints/src/write.rs | 16 ++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/clippy_lints/src/dbg_macro.rs b/clippy_lints/src/dbg_macro.rs index 1aae4c81c73c..5a0b60fdfbc0 100644 --- a/clippy_lints/src/dbg_macro.rs +++ b/clippy_lints/src/dbg_macro.rs @@ -15,6 +15,14 @@ declare_clippy_lint! { /// `dbg!` macro is intended as a debugging tool. It /// should not be in version control. /// + /// ### Known problems + /// * The lint level is unaffected by crate attributes. The level can still + /// be set for functions, modules and other items. To change the level for + /// the entire crate, please use command line flags. More information and a + /// configuration example can be found in [clippy#6610]. + /// + /// [clippy#6610]: https://github.com/rust-lang/rust-clippy/issues/6610#issuecomment-977120558 + /// /// ### Example /// ```rust,ignore /// // Bad diff --git a/clippy_lints/src/write.rs b/clippy_lints/src/write.rs index bfa9407285b5..c90fca24ad48 100644 --- a/clippy_lints/src/write.rs +++ b/clippy_lints/src/write.rs @@ -72,7 +72,13 @@ declare_clippy_lint! { /// application and might forget to remove those prints afterward. /// /// ### Known problems - /// Only catches `print!` and `println!` calls. + /// * Only catches `print!` and `println!` calls. + /// * The lint level is unaffected by crate attributes. The level can still + /// be set for functions, modules and other items. To change the level for + /// the entire crate, please use command line flags. More information and a + /// configuration example can be found in [clippy#6610]. + /// + /// [clippy#6610]: https://github.com/rust-lang/rust-clippy/issues/6610#issuecomment-977120558 /// /// ### Example /// ```rust @@ -94,7 +100,13 @@ declare_clippy_lint! { /// application and might forget to remove those prints afterward. /// /// ### Known problems - /// Only catches `eprint!` and `eprintln!` calls. + /// * Only catches `eprint!` and `eprintln!` calls. + /// * The lint level is unaffected by crate attributes. The level can still + /// be set for functions, modules and other items. To change the level for + /// the entire crate, please use command line flags. More information and a + /// configuration example can be found in [clippy#6610]. + /// + /// [clippy#6610]: https://github.com/rust-lang/rust-clippy/issues/6610#issuecomment-977120558 /// /// ### Example /// ```rust From 17b747857f8ac3dc33b323748064ca68ab7d1489 Mon Sep 17 00:00:00 2001 From: xFrednet Date: Fri, 3 Dec 2021 19:53:15 +0100 Subject: [PATCH 2/2] Add margin after lists on Clippy's lint list --- util/gh-pages/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/gh-pages/index.html b/util/gh-pages/index.html index 58e8b4f4829f..f175700a3f47 100644 --- a/util/gh-pages/index.html +++ b/util/gh-pages/index.html @@ -336,7 +336,7 @@ Otherwise, have a great day =^.^= - +