diff options
author | Igor Aleksanov <[email protected]> | 2020-08-12 15:26:43 +0100 |
---|---|---|
committer | Igor Aleksanov <[email protected]> | 2020-08-12 15:26:43 +0100 |
commit | b50bb800a5b5e01b6cb4de10330fd5b61d6cd0db (patch) | |
tree | adb19b05996e8a2829f5a6eb0ed7017404aaf7da /xtask | |
parent | 13f736d4a13bdf5af2cdd6a4832a41470431a70b (diff) | |
parent | 6be5ab02008b442c85c201968b97f24f13c4692e (diff) |
Merge branch 'master' into add-disable-diagnostics
Diffstat (limited to 'xtask')
-rw-r--r-- | xtask/tests/tidy.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/xtask/tests/tidy.rs b/xtask/tests/tidy.rs index d65a2acbc..4ff72865e 100644 --- a/xtask/tests/tidy.rs +++ b/xtask/tests/tidy.rs | |||
@@ -44,11 +44,26 @@ 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 | ||
53 | fn deny_clippy(path: &PathBuf, text: &String) { | ||
54 | if text.contains("[\u{61}llow(clippy") { | ||
55 | panic!( | ||
56 | "\n\nallowing lints is forbidden: {}. | ||
57 | rust-analyzer intentionally doesn't check clippy on CI. | ||
58 | You can allow lint globally via `xtask clippy`. | ||
59 | See https://github.com/rust-lang/rust-clippy/issues/5537 for discussion. | ||
60 | |||
61 | ", | ||
62 | path.display() | ||
63 | ) | ||
64 | } | ||
65 | } | ||
66 | |||
52 | #[test] | 67 | #[test] |
53 | fn check_licenses() { | 68 | fn check_licenses() { |
54 | let expected = " | 69 | let expected = " |