From 49af51129b943784a3e6dbe33b05b6f683965b28 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 12 Aug 2020 12:45:38 +0200 Subject: Deny clippy --- xtask/tests/tidy.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'xtask') diff --git a/xtask/tests/tidy.rs b/xtask/tests/tidy.rs index d65a2acbc..ca2301021 100644 --- a/xtask/tests/tidy.rs +++ b/xtask/tests/tidy.rs @@ -44,11 +44,25 @@ fn rust_files_are_tidy() { let text = fs2::read_to_string(&path).unwrap(); check_todo(&path, &text); check_trailing_ws(&path, &text); + deny_clippy(&path, &text); tidy_docs.visit(&path, &text); } tidy_docs.finish(); } +fn deny_clippy(path: &PathBuf, text: &String) { + if text.contains("[\u{61}llow(clippy") { + panic!( + "\n\nallowing lints is forbidden: {}. +rust-analyzer intentionally doesn't check clippy on CI. +You can allow lint globally via `xtask clippy`. + +", + path.display() + ) + } +} + #[test] fn check_licenses() { let expected = " -- cgit v1.2.3