Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyukang committed Mar 8, 2024
1 parent c60db50 commit 02ac0ef
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/tools/tidy/src/ui_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,18 @@ pub fn check(path: &Path, bless: bool, bad: &mut bool) {

// the list of files in ui tests that are allowed to start with `issue-XXXX`
// BTreeSet because we would like a stable ordering so --bless works
let allowed_issue_names = BTreeSet::from(
include!("issues.txt").map(|path| path.replace("/", std::path::MAIN_SEPARATOR_STR)),
);
let issues_list =
include!("issues.txt").map(|path| path.replace("/", std::path::MAIN_SEPARATOR_STR));
let issues: Vec<String> = Vec::from(issues_list.clone());
let is_sorted = issues.windows(2).all(|w| w[0] <= w[1]);
if !is_sorted && !bless {
tidy_error!(
bad,
"`src/tools/tidy/src/issues.txt` is not in order, mostly because you modified it manually,
please only update it with command `x test tidy --bless`"
);
}
let allowed_issue_names = BTreeSet::from(issues_list);

let mut remaining_issue_names: BTreeSet<String> = allowed_issue_names.clone();

Expand Down

0 comments on commit 02ac0ef

Please sign in to comment.