Skip to content

Commit d0b45a9

Browse files
tidy: stop special-casing tests/ui entry limit
1 parent 39e02f1 commit d0b45a9

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

src/tools/tidy/src/ui_tests.rs

+2-13
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ const ENTRY_LIMIT: usize = 900;
1616
// FIXME: The following limits should be reduced eventually.
1717

1818
const ISSUES_ENTRY_LIMIT: usize = 1676;
19-
const ROOT_ENTRY_LIMIT: usize = 757;
2019

2120
const EXPECTED_TEST_FILE_EXTENSIONS: &[&str] = &[
2221
"rs", // test source files
@@ -63,14 +62,10 @@ fn check_entries(tests_path: &Path, bad: &mut bool) {
6362
}
6463
}
6564

66-
let (mut max, mut max_root, mut max_issues) = (0usize, 0usize, 0usize);
65+
let (mut max, mut max_issues) = (0usize, 0usize);
6766
for (dir_path, count) in directories {
68-
// Use special values for these dirs.
69-
let is_root = tests_path.join("ui") == dir_path;
7067
let is_issues_dir = tests_path.join("ui/issues") == dir_path;
71-
let (limit, maxcnt) = if is_root {
72-
(ROOT_ENTRY_LIMIT, &mut max_root)
73-
} else if is_issues_dir {
68+
let (limit, maxcnt) = if is_issues_dir {
7469
(ISSUES_ENTRY_LIMIT, &mut max_issues)
7570
} else {
7671
(ENTRY_LIMIT, &mut max)
@@ -87,12 +82,6 @@ fn check_entries(tests_path: &Path, bad: &mut bool) {
8782
);
8883
}
8984
}
90-
if ROOT_ENTRY_LIMIT > max_root {
91-
tidy_error!(
92-
bad,
93-
"`ROOT_ENTRY_LIMIT` is too high (is {ROOT_ENTRY_LIMIT}, should be {max_root})"
94-
);
95-
}
9685
if ISSUES_ENTRY_LIMIT > max_issues {
9786
tidy_error!(
9887
bad,

0 commit comments

Comments
 (0)