From aa031e91f4f809933eb967edda256ebf6b8bf4ea Mon Sep 17 00:00:00 2001 From: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com> Date: Tue, 20 Oct 2020 21:29:31 +0200 Subject: add completions for clippy lint in attributes Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com> --- xtask/tests/tidy.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'xtask/tests/tidy.rs') 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- } fn deny_clippy(path: &PathBuf, text: &String) { + let ignore = &[ + // The documentation in string literals may contain anything for its own purposes + "completion/src/generated_lint_completions.rs", + ]; + if ignore.iter().any(|p| path.ends_with(p)) { + return; + } + if text.contains("[\u{61}llow(clippy") { panic!( "\n\nallowing lints is forbidden: {}. @@ -214,7 +222,7 @@ fn check_todo(path: &Path, text: &str) { // `ast::make`. "ast/make.rs", // The documentation in string literals may contain anything for its own purposes - "completion/src/generated_features.rs", + "completion/src/generated_lint_completions.rs", ]; if need_todo.iter().any(|p| path.ends_with(p)) { return; -- cgit v1.2.3