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.
This commit is contained in:
kennytm 2018-08-17 00:13:27 +08:00 committed by GitHub
commit ae3ebf0316
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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()
}