Skip to content

Commit f31684d

Browse files
tidy: stop special-casing tests/ui entry limit
1 parent eb1a5c9 commit f31684d

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 = 859;
2019

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

65-
let (mut max, mut max_root, mut max_issues) = (0usize, 0usize, 0usize);
64+
let (mut max, mut max_issues) = (0usize, 0usize);
6665
for (dir_path, count) in directories {
67-
// Use special values for these dirs.
68-
let is_root = tests_path.join("ui") == dir_path;
6966
let is_issues_dir = tests_path.join("ui/issues") == dir_path;
70-
let (limit, maxcnt) = if is_root {
71-
(ROOT_ENTRY_LIMIT, &mut max_root)
72-
} else if is_issues_dir {
67+
let (limit, maxcnt) = if is_issues_dir {
7368
(ISSUES_ENTRY_LIMIT, &mut max_issues)
7469
} else {
7570
(ENTRY_LIMIT, &mut max)
@@ -86,12 +81,6 @@ fn check_entries(tests_path: &Path, bad: &mut bool) {
8681
);
8782
}
8883
}
89-
if ROOT_ENTRY_LIMIT > max_root {
90-
tidy_error!(
91-
bad,
92-
"`ROOT_ENTRY_LIMIT` is too high (is {ROOT_ENTRY_LIMIT}, should be {max_root})"
93-
);
94-
}
9584
if ISSUES_ENTRY_LIMIT > max_issues {
9685
tidy_error!(
9786
bad,

0 commit comments

Comments
 (0)