Skip to content

Commit

Permalink
assert "src/tools/tidy/src/issues.txt" length
Browse files Browse the repository at this point in the history
Signed-off-by: onur-ozkan <work@onurozkan.dev>
  • Loading branch information
onur-ozkan committed Apr 1, 2024
1 parent 6e5caac commit 2e202e9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/tools/tidy/src/ui_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ fn check_entries(tests_path: &Path, bad: &mut bool) {
}

pub fn check(root_path: &Path, bless: bool, bad: &mut bool) {
// This can be decreased but can never be increased.
const EXPECTED_LINE_COUNT: usize = 4372;

let path = &root_path.join("tests");
check_entries(&path, bad);

Expand All @@ -120,6 +123,12 @@ pub fn check(root_path: &Path, bless: bool, bad: &mut bool) {
})
.collect();

assert_eq!(
EXPECTED_LINE_COUNT,
allowed_issue_names.len(),
"If you have added new lines to issues.txt, please revert them; otherwise, decrease the EXPECTED_LINE_COUNT."
);

if !is_sorted && !bless {
tidy_error!(
bad,
Expand Down

0 comments on commit 2e202e9

Please sign in to comment.