aboutsummaryrefslogtreecommitdiff
path: root/xtask/tests/tidy.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-08-12 11:51:02 +0100
committerGitHub <[email protected]>2020-08-12 11:51:02 +0100
commite471cb2a127b45cec5f23359ea92bf6bcad753b6 (patch)
tree4e90245f6f39220f41d6fb446bf08b6fdbbf5961 /xtask/tests/tidy.rs
parentd0fd8eb7f6303e5c49cd5107a8db2aa1937845d5 (diff)
parent49af51129b943784a3e6dbe33b05b6f683965b28 (diff)
Merge #5718
5718: Deny clippy r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'xtask/tests/tidy.rs')
-rw-r--r--xtask/tests/tidy.rs14
1 files changed, 14 insertions, 0 deletions
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() {
44 let text = fs2::read_to_string(&path).unwrap(); 44 let text = fs2::read_to_string(&path).unwrap();
45 check_todo(&path, &text); 45 check_todo(&path, &text);
46 check_trailing_ws(&path, &text); 46 check_trailing_ws(&path, &text);
47 deny_clippy(&path, &text);
47 tidy_docs.visit(&path, &text); 48 tidy_docs.visit(&path, &text);
48 } 49 }
49 tidy_docs.finish(); 50 tidy_docs.finish();
50} 51}
51 52
53fn deny_clippy(path: &PathBuf, text: &String) {
54 if text.contains("[\u{61}llow(clippy") {
55 panic!(
56 "\n\nallowing lints is forbidden: {}.
57rust-analyzer intentionally doesn't check clippy on CI.
58You can allow lint globally via `xtask clippy`.
59
60",
61 path.display()
62 )
63 }
64}
65
52#[test] 66#[test]
53fn check_licenses() { 67fn check_licenses() {
54 let expected = " 68 let expected = "