aboutsummaryrefslogtreecommitdiff
path: root/xtask/tests/tidy.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-10-20 20:43:44 +0100
committerGitHub <[email protected]>2020-10-20 20:43:44 +0100
commit08823c82627540d42de055112eaf8745c694ff47 (patch)
treec78e34fbda9795c0671c71661a6c63faaf596a3b /xtask/tests/tidy.rs
parentc00339509d27061f77dac5eef33335095afea8ec (diff)
parentaa031e91f4f809933eb967edda256ebf6b8bf4ea (diff)
Merge #6109
6109: add completions for clippy lint in attributes r=bnjjj a=bnjjj Co-authored-by: Benjamin Coenen <[email protected]>
Diffstat (limited to 'xtask/tests/tidy.rs')
-rw-r--r--xtask/tests/tidy.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/xtask/tests/tidy.rs b/xtask/tests/tidy.rs
index faaef2fd4..9de60c76c 100644
--- a/xtask/tests/tidy.rs
+++ b/xtask/tests/tidy.rs
@@ -131,6 +131,14 @@ https://github.blog/2015-06-08-how-to-undo-almost-anything-with-git/#redo-after-
131} 131}
132 132
133fn deny_clippy(path: &PathBuf, text: &String) { 133fn deny_clippy(path: &PathBuf, text: &String) {
134 let ignore = &[
135 // The documentation in string literals may contain anything for its own purposes
136 "completion/src/generated_lint_completions.rs",
137 ];
138 if ignore.iter().any(|p| path.ends_with(p)) {
139 return;
140 }
141
134 if text.contains("[\u{61}llow(clippy") { 142 if text.contains("[\u{61}llow(clippy") {
135 panic!( 143 panic!(
136 "\n\nallowing lints is forbidden: {}. 144 "\n\nallowing lints is forbidden: {}.
@@ -214,7 +222,7 @@ fn check_todo(path: &Path, text: &str) {
214 // `ast::make`. 222 // `ast::make`.
215 "ast/make.rs", 223 "ast/make.rs",
216 // The documentation in string literals may contain anything for its own purposes 224 // The documentation in string literals may contain anything for its own purposes
217 "completion/src/generated_features.rs", 225 "completion/src/generated_lint_completions.rs",
218 ]; 226 ];
219 if need_todo.iter().any(|p| path.ends_with(p)) { 227 if need_todo.iter().any(|p| path.ends_with(p)) {
220 return; 228 return;