Skip to content

Commit

Permalink
Detect duplication between excluded files and dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Sep 3, 2023
1 parent ecfbe2e commit f3727bf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/repo/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,11 @@ pub fn clone_rust() {
if !exclude_files_set.insert(exclude) {
panic!("duplicate path in EXCLUDE_FILES: {}", exclude);
}
for dir in EXCLUDE_DIRS {
if Path::new(exclude).starts_with(dir) {
panic!("excluded file {} is inside an excluded dir", exclude);
}
}
if !test_src.join(exclude).is_file() {
missing += "\ntests/rust/";
missing += exclude;
Expand Down

0 comments on commit f3727bf

Please sign in to comment.