From 751d0367c2de63903897570f03c9dc1a4d5eb52a Mon Sep 17 00:00:00 2001 From: Dmitry Date: Mon, 10 Aug 2020 00:35:42 +0700 Subject: fix tidy check --- xtask/tests/tidy.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'xtask/tests/tidy.rs') diff --git a/xtask/tests/tidy.rs b/xtask/tests/tidy.rs index d65a2acbc..15a93b7a2 100644 --- a/xtask/tests/tidy.rs +++ b/xtask/tests/tidy.rs @@ -97,6 +97,8 @@ fn check_todo(path: &Path, text: &str) { // To support generating `todo!()` in assists, we have `expr_todo()` in // `ast::make`. "ast/make.rs", + // The documentation in string literals may contain anything for its own purposes + "/completion/unstable_feature_descriptor.rs" ]; if need_todo.iter().any(|p| path.ends_with(p)) { return; -- cgit v1.2.3 From 8366e3a7d59605ea2d0e681d73e8d5b48bf48e17 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Mon, 10 Aug 2020 00:39:49 +0700 Subject: refactoring to show more clearly the import problems --- xtask/tests/tidy.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xtask/tests/tidy.rs') diff --git a/xtask/tests/tidy.rs b/xtask/tests/tidy.rs index 15a93b7a2..68a70da9e 100644 --- a/xtask/tests/tidy.rs +++ b/xtask/tests/tidy.rs @@ -98,7 +98,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/unstable_feature_descriptor.rs" + "completion/unstable_feature_descriptor.rs", ]; if need_todo.iter().any(|p| path.ends_with(p)) { return; -- cgit v1.2.3 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/tests/tidy.rs') 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 From c81e7a3a5936688cbe94c32f4e872ff36100def2 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 12 Aug 2020 13:03:43 +0200 Subject: Minor --- xtask/tests/tidy.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'xtask/tests/tidy.rs') diff --git a/xtask/tests/tidy.rs b/xtask/tests/tidy.rs index ca2301021..4ff72865e 100644 --- a/xtask/tests/tidy.rs +++ b/xtask/tests/tidy.rs @@ -56,6 +56,7 @@ fn deny_clippy(path: &PathBuf, text: &String) { "\n\nallowing lints is forbidden: {}. rust-analyzer intentionally doesn't check clippy on CI. You can allow lint globally via `xtask clippy`. +See https://github.com/rust-lang/rust-clippy/issues/5537 for discussion. ", path.display() -- cgit v1.2.3 From 208b7bd7ba687fb570feb1b89219f14c63712ce8 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 12 Aug 2020 16:32:36 +0200 Subject: Rename ra_prof -> profile --- xtask/tests/tidy.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xtask/tests/tidy.rs') diff --git a/xtask/tests/tidy.rs b/xtask/tests/tidy.rs index 4ff72865e..7384205db 100644 --- a/xtask/tests/tidy.rs +++ b/xtask/tests/tidy.rs @@ -197,7 +197,7 @@ impl TidyDocs { "ra_ide", "ra_mbe", "ra_parser", - "ra_prof", + "profile", "ra_project_model", "ra_syntax", "ra_tt", -- cgit v1.2.3 From 550d7fbe3cbf2af4a47fca6c9bbefaf798cd7b7b Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 12 Aug 2020 16:46:20 +0200 Subject: Rename ra_tt -> tt --- xtask/tests/tidy.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xtask/tests/tidy.rs') diff --git a/xtask/tests/tidy.rs b/xtask/tests/tidy.rs index 7384205db..ddaab93ab 100644 --- a/xtask/tests/tidy.rs +++ b/xtask/tests/tidy.rs @@ -200,7 +200,7 @@ impl TidyDocs { "profile", "ra_project_model", "ra_syntax", - "ra_tt", + "tt", "ra_hir_ty", ]; -- cgit v1.2.3 From 50a02eb3593591a02677e1b56f24d7ff0459b9d0 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 12 Aug 2020 17:06:49 +0200 Subject: Rename ra_parser -> parser --- xtask/tests/tidy.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xtask/tests/tidy.rs') diff --git a/xtask/tests/tidy.rs b/xtask/tests/tidy.rs index ddaab93ab..f1a7e8288 100644 --- a/xtask/tests/tidy.rs +++ b/xtask/tests/tidy.rs @@ -196,7 +196,7 @@ impl TidyDocs { "ra_hir_expand", "ra_ide", "ra_mbe", - "ra_parser", + "parser", "profile", "ra_project_model", "ra_syntax", -- cgit v1.2.3 From a1c187eef3ba08076aedb5154929f7eda8d1b424 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 12 Aug 2020 18:26:51 +0200 Subject: Rename ra_syntax -> syntax --- xtask/tests/tidy.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xtask/tests/tidy.rs') diff --git a/xtask/tests/tidy.rs b/xtask/tests/tidy.rs index f1a7e8288..8c608284a 100644 --- a/xtask/tests/tidy.rs +++ b/xtask/tests/tidy.rs @@ -199,7 +199,7 @@ impl TidyDocs { "parser", "profile", "ra_project_model", - "ra_syntax", + "syntax", "tt", "ra_hir_ty", ]; -- cgit v1.2.3 From 2f45cfc415626cfae5cba89c88a25fb3225486f7 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 13 Aug 2020 10:08:11 +0200 Subject: Rename ra_mbe -> mbe --- xtask/tests/tidy.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xtask/tests/tidy.rs') diff --git a/xtask/tests/tidy.rs b/xtask/tests/tidy.rs index 8c608284a..0188aaa2e 100644 --- a/xtask/tests/tidy.rs +++ b/xtask/tests/tidy.rs @@ -195,7 +195,7 @@ impl TidyDocs { "ra_hir", "ra_hir_expand", "ra_ide", - "ra_mbe", + "mbe", "parser", "profile", "ra_project_model", -- cgit v1.2.3 From eac24d52e672c0a9c118e8969bf1b839c3e7f1f3 Mon Sep 17 00:00:00 2001 From: Pavan Kumar Sunkara Date: Thu, 13 Aug 2020 12:05:30 +0200 Subject: Rename ra_project_model -> project_model --- xtask/tests/tidy.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xtask/tests/tidy.rs') diff --git a/xtask/tests/tidy.rs b/xtask/tests/tidy.rs index 0188aaa2e..2e68e71db 100644 --- a/xtask/tests/tidy.rs +++ b/xtask/tests/tidy.rs @@ -198,7 +198,7 @@ impl TidyDocs { "mbe", "parser", "profile", - "ra_project_model", + "project_model", "syntax", "tt", "ra_hir_ty", -- cgit v1.2.3 From b7aa4898e0841ab8199643f89a0caa967b698ca8 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 13 Aug 2020 16:26:29 +0200 Subject: Rename ra_hir_expand -> hir_expand --- xtask/tests/tidy.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xtask/tests/tidy.rs') diff --git a/xtask/tests/tidy.rs b/xtask/tests/tidy.rs index 2e68e71db..dc367d1e0 100644 --- a/xtask/tests/tidy.rs +++ b/xtask/tests/tidy.rs @@ -193,7 +193,7 @@ impl TidyDocs { let poorly_documented = [ "ra_hir", - "ra_hir_expand", + "hir_expand", "ra_ide", "mbe", "parser", -- cgit v1.2.3 From 6a77ec7bbe6ddbf663dce9529d11d1bb56c5489a Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 13 Aug 2020 16:35:29 +0200 Subject: Rename ra_hir_ty -> hir_ty --- xtask/tests/tidy.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xtask/tests/tidy.rs') diff --git a/xtask/tests/tidy.rs b/xtask/tests/tidy.rs index dc367d1e0..5a5bd4a3e 100644 --- a/xtask/tests/tidy.rs +++ b/xtask/tests/tidy.rs @@ -201,7 +201,7 @@ impl TidyDocs { "project_model", "syntax", "tt", - "ra_hir_ty", + "hir_ty", ]; let mut has_fixmes = -- cgit v1.2.3 From ae71a631fd657368e8593feb5e025d23147afe60 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 13 Aug 2020 16:36:55 +0200 Subject: Rename ra_hir -> hir --- xtask/tests/tidy.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xtask/tests/tidy.rs') diff --git a/xtask/tests/tidy.rs b/xtask/tests/tidy.rs index 5a5bd4a3e..97a11a01e 100644 --- a/xtask/tests/tidy.rs +++ b/xtask/tests/tidy.rs @@ -192,7 +192,7 @@ impl TidyDocs { } let poorly_documented = [ - "ra_hir", + "hir", "hir_expand", "ra_ide", "mbe", -- cgit v1.2.3 From 1b0c7701cc97cd7bef8bb9729011d4cf291a60c5 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 13 Aug 2020 17:42:52 +0200 Subject: Rename ra_ide -> ide --- xtask/tests/tidy.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xtask/tests/tidy.rs') diff --git a/xtask/tests/tidy.rs b/xtask/tests/tidy.rs index 97a11a01e..76895aeca 100644 --- a/xtask/tests/tidy.rs +++ b/xtask/tests/tidy.rs @@ -194,7 +194,7 @@ impl TidyDocs { let poorly_documented = [ "hir", "hir_expand", - "ra_ide", + "ide", "mbe", "parser", "profile", -- cgit v1.2.3 From 88adca766aca7c8e771b422c33f44afbfc6d0d81 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 18 Aug 2020 10:49:18 +0200 Subject: :arrow_up: crates --- xtask/tests/tidy.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xtask/tests/tidy.rs') diff --git a/xtask/tests/tidy.rs b/xtask/tests/tidy.rs index 76895aeca..ebd42cef7 100644 --- a/xtask/tests/tidy.rs +++ b/xtask/tests/tidy.rs @@ -82,7 +82,7 @@ MIT/Apache-2.0 MIT/Apache-2.0 AND BSD-2-Clause Unlicense OR MIT Unlicense/MIT -Zlib +Zlib OR Apache-2.0 OR MIT " .lines() .filter(|it| !it.is_empty()) -- cgit v1.2.3 From 27ccc95c60d5652d5e7ef0dd7bd50cf221385d00 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 18 Aug 2020 19:31:06 +0200 Subject: Cleanup feature generation --- xtask/tests/tidy.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xtask/tests/tidy.rs') diff --git a/xtask/tests/tidy.rs b/xtask/tests/tidy.rs index bec3c630b..4fdff62ee 100644 --- a/xtask/tests/tidy.rs +++ b/xtask/tests/tidy.rs @@ -113,7 +113,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/unstable_feature_descriptor.rs", + "completion/generated_features.rs", ]; if need_todo.iter().any(|p| path.ends_with(p)) { return; -- cgit v1.2.3