Skip to content

Commit

Permalink
Rollup merge of rust-lang#53399 - varkor:ignore-non-md-unstable_book,…
Browse files Browse the repository at this point in the history
… 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.
  • Loading branch information
kennytm authored Aug 16, 2018
2 parents 6e98ed9 + 35a03c8 commit ae3ebf0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/tools/tidy/src/unstable_book.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down

0 comments on commit ae3ebf0

Please sign in to comment.