about summary refs log tree commit diff
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-08-17 00:13:27 +0800
committerGitHub <noreply@github.com>2018-08-17 00:13:27 +0800
commitae3ebf0316eb282bff311d183d1bb5d9abbf7e70 (patch)
tree8e34f3a9ca6a3737e578451f7780efccde8cba6c
parent6e98ed9650dd392adbfe0b973e03964d0d069863 (diff)
parent35a03c805281a84273df643334b967f22edb664e (diff)
downloadrust-ae3ebf0316eb282bff311d183d1bb5d9abbf7e70.tar.gz
rust-ae3ebf0316eb282bff311d183d1bb5d9abbf7e70.zip
Rollup merge of #53399 - varkor:ignore-non-md-unstable_book, r=nikomatsakis
Tidy: ignore non-Markdown files when linting for the Unstable Book

Previously, any file would be assumed a `.md`, which is annoying when files like `.DS_STORE` slip in and then cause tidy errors.
-rw-r--r--src/tools/tidy/src/unstable_book.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tools/tidy/src/unstable_book.rs b/src/tools/tidy/src/unstable_book.rs
index 6b573908de9..62296f73f01 100644
--- a/src/tools/tidy/src/unstable_book.rs
+++ b/src/tools/tidy/src/unstable_book.rs
@@ -60,6 +60,7 @@ pub fn collect_unstable_book_section_file_names(dir: &path::Path) -> BTreeSet<St
         .map(|entry| entry.expect("could not read directory entry"))
         .filter(dir_entry_is_file)
         .map(|entry| entry.file_name().into_string().unwrap())
+        .filter(|n| n.ends_with(".md"))
         .map(|n| n.trim_right_matches(".md").to_owned())
         .collect()
 }