From 8922a44395482896fec0c0a47a7fac4612112d45 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 4 Nov 2019 00:11:37 +0300 Subject: Add small module-level docs --- xtask/tests/tidy-tests/docs.rs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'xtask') 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 { fn no_docs_comments() { let crates = project_root().join("crates"); let iter = WalkDir::new(crates); + let mut missing_docs = Vec::new(); for f in iter.into_iter().filter_entry(|e| !is_hidden(e)) { let f = f.unwrap(); if f.file_type().is_dir() { @@ -54,12 +55,14 @@ fn no_docs_comments() { let mut line = String::new(); reader.read_line(&mut line).unwrap(); if !line.starts_with("//!") { - panic!( - "\nMissing docs strings\n\ - module: {}\n\ - Need add doc for module\n", - f.path().display() - ) + missing_docs.push(f.path().display().to_string()); } } + if !missing_docs.is_empty() { + panic!( + "\nMissing docs strings\n\n\ + modules:\n{}\n\n", + missing_docs.join("\n") + ) + } } -- cgit v1.2.3