tidy: stop special-casing tests/ui entry limit
This commit is contained in:
parent
39e02f1bd1
commit
d0b45a951b
@ -16,7 +16,6 @@
|
||||
// FIXME: The following limits should be reduced eventually.
|
||||
|
||||
const ISSUES_ENTRY_LIMIT: usize = 1676;
|
||||
const ROOT_ENTRY_LIMIT: usize = 757;
|
||||
|
||||
const EXPECTED_TEST_FILE_EXTENSIONS: &[&str] = &[
|
||||
"rs", // test source files
|
||||
@ -63,14 +62,10 @@ fn check_entries(tests_path: &Path, bad: &mut bool) {
|
||||
}
|
||||
}
|
||||
|
||||
let (mut max, mut max_root, mut max_issues) = (0usize, 0usize, 0usize);
|
||||
let (mut max, mut max_issues) = (0usize, 0usize);
|
||||
for (dir_path, count) in directories {
|
||||
// Use special values for these dirs.
|
||||
let is_root = tests_path.join("ui") == dir_path;
|
||||
let is_issues_dir = tests_path.join("ui/issues") == dir_path;
|
||||
let (limit, maxcnt) = if is_root {
|
||||
(ROOT_ENTRY_LIMIT, &mut max_root)
|
||||
} else if is_issues_dir {
|
||||
let (limit, maxcnt) = if is_issues_dir {
|
||||
(ISSUES_ENTRY_LIMIT, &mut max_issues)
|
||||
} else {
|
||||
(ENTRY_LIMIT, &mut max)
|
||||
@ -87,12 +82,6 @@ fn check_entries(tests_path: &Path, bad: &mut bool) {
|
||||
);
|
||||
}
|
||||
}
|
||||
if ROOT_ENTRY_LIMIT > max_root {
|
||||
tidy_error!(
|
||||
bad,
|
||||
"`ROOT_ENTRY_LIMIT` is too high (is {ROOT_ENTRY_LIMIT}, should be {max_root})"
|
||||
);
|
||||
}
|
||||
if ISSUES_ENTRY_LIMIT > max_issues {
|
||||
tidy_error!(
|
||||
bad,
|
||||
|
Loading…
Reference in New Issue
Block a user