aboutsummaryrefslogtreecommitdiff
path: root/xtask/tests
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-11-03 21:34:50 +0000
committerGitHub <[email protected]>2019-11-03 21:34:50 +0000
commit4fd742d6bc23e2f61d0980e15234f09d7e715b76 (patch)
treec37d38f9313f54ea71580f6bd005f554388a57ab /xtask/tests
parentf9f1effd011b906903891c09f1cb6b2a42f73e95 (diff)
parent8922a44395482896fec0c0a47a7fac4612112d45 (diff)
Merge #2163
2163: Move CrateDefMap to hir_def r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'xtask/tests')
-rw-r--r--xtask/tests/tidy-tests/docs.rs15
1 files changed, 9 insertions, 6 deletions
diff --git a/xtask/tests/tidy-tests/docs.rs b/xtask/tests/tidy-tests/docs.rs
index 6a629ce63..227937f46 100644
--- a/xtask/tests/tidy-tests/docs.rs
+++ b/xtask/tests/tidy-tests/docs.rs
@@ -36,6 +36,7 @@ fn is_hidden(entry: &DirEntry) -> bool {
36fn no_docs_comments() { 36fn no_docs_comments() {
37 let crates = project_root().join("crates"); 37 let crates = project_root().join("crates");
38 let iter = WalkDir::new(crates); 38 let iter = WalkDir::new(crates);
39 let mut missing_docs = Vec::new();
39 for f in iter.into_iter().filter_entry(|e| !is_hidden(e)) { 40 for f in iter.into_iter().filter_entry(|e| !is_hidden(e)) {
40 let f = f.unwrap(); 41 let f = f.unwrap();
41 if f.file_type().is_dir() { 42 if f.file_type().is_dir() {
@@ -54,12 +55,14 @@ fn no_docs_comments() {
54 let mut line = String::new(); 55 let mut line = String::new();
55 reader.read_line(&mut line).unwrap(); 56 reader.read_line(&mut line).unwrap();
56 if !line.starts_with("//!") { 57 if !line.starts_with("//!") {
57 panic!( 58 missing_docs.push(f.path().display().to_string());
58 "\nMissing docs strings\n\
59 module: {}\n\
60 Need add doc for module\n",
61 f.path().display()
62 )
63 } 59 }
64 } 60 }
61 if !missing_docs.is_empty() {
62 panic!(
63 "\nMissing docs strings\n\n\
64 modules:\n{}\n\n",
65 missing_docs.join("\n")
66 )
67 }
65} 68}