Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
677357d
Fix typos in compiler
DaniPopes Apr 10, 2023
f06640d
Update ty_utils_never_to_any_not_supported diagnostic message
DaniPopes Apr 10, 2023
40f12c6
Revert method-not-found-generic-arg-elision test bless
DaniPopes Apr 10, 2023
24cbf81
Remove `..` from return type notation
compiler-errors Apr 10, 2023
5716ae6
Introduce `Region::get_name_or_anon`.
nnethercote Apr 11, 2023
1eb5390
Fix `RegionCtxt::preference_value`.
nnethercote Apr 11, 2023
bd7f301
Use the existing `static` and `env` symbols instead of interning.
nnethercote Apr 11, 2023
7975779
Add `sym::anon`.
nnethercote Apr 11, 2023
4b456cb
compiler: improve captured metavariables diagnostic
lovelymono Apr 12, 2023
04f20d4
compiler: print the suggestion only for local macros
lovelymono Apr 12, 2023
e0ed174
tidy: Issue an error when ui test limits are too high
clubby789 Apr 12, 2023
ad9a89e
rustdoc: make settings radio and checks thicker, less contrast
notriddle Apr 11, 2023
f263f88
Split out a separate feature gate for impl trait in associated types
oli-obk Apr 12, 2023
bb7ed64
rustdoc: use CSS `overscroll-behavior` instead of JavaScript
notriddle Apr 10, 2023
331e7c3
Rollup merge of #110153 - DaniPopes:compiler-typos, r=Nilstrieb
matthiaskrgr Apr 12, 2023
05e67b5
Rollup merge of #110165 - notriddle:notriddle/overscroll-behavior, r=…
matthiaskrgr Apr 12, 2023
b4734f0
Rollup merge of #110175 - nnethercote:symbol-cleanups, r=jackh726
matthiaskrgr Apr 12, 2023
a34bcd7
Rollup merge of #110203 - compiler-errors:rtn-dots, r=eholk
matthiaskrgr Apr 12, 2023
b53817d
Rollup merge of #110205 - notriddle:notriddle/pixelated-border, r=Gui…
matthiaskrgr Apr 12, 2023
d54a8ac
Rollup merge of #110222 - lovelymono:rustc-expand-mbe-diagnostic, r=d…
matthiaskrgr Apr 12, 2023
214e4ef
Rollup merge of #110237 - oli-obk:impl_trait_in_assoc_tys, r=jackh726
matthiaskrgr Apr 12, 2023
4844164
Rollup merge of #110241 - clubby789:tidy-reduce-limit, r=albertlarsan68
matthiaskrgr Apr 12, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
tidy: Issue an error when ui test limits are too high
  • Loading branch information
clubby789 committed Apr 12, 2023
commit e0ed17441f544870c1fa046f10408e93ec178b7c
28 changes: 22 additions & 6 deletions src/tools/tidy/src/ui_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use std::path::{Path, PathBuf};

// FIXME: The following limits should be reduced eventually.
const ENTRY_LIMIT: usize = 885;
const ROOT_ENTRY_LIMIT: usize = 881;
const ROOT_ENTRY_LIMIT: usize = 880;
const ISSUES_ENTRY_LIMIT: usize = 1978;

fn check_entries(tests_path: &Path, bad: &mut bool) {
Expand All @@ -22,18 +22,19 @@ fn check_entries(tests_path: &Path, bad: &mut bool) {
}
}

let (mut max, mut max_root, mut max_issues) = (0usize, 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 = if is_root {
ROOT_ENTRY_LIMIT
let (limit, maxcnt) = if is_root {
(ROOT_ENTRY_LIMIT, &mut max_root)
} else if is_issues_dir {
ISSUES_ENTRY_LIMIT
(ISSUES_ENTRY_LIMIT, &mut max_issues)
} else {
ENTRY_LIMIT
(ENTRY_LIMIT, &mut max)
};

*maxcnt = (*maxcnt).max(count);
if count > limit {
tidy_error!(
bad,
Expand All @@ -45,6 +46,21 @@ fn check_entries(tests_path: &Path, bad: &mut bool) {
);
}
}
if ENTRY_LIMIT > max {
tidy_error!(bad, "`ENTRY_LIMIT` is too high (is {ENTRY_LIMIT}, should be {max})");
}
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,
"`ISSUES_ENTRY_LIMIT` is too high (is {ISSUES_ENTRY_LIMIT}, should be {max_issues})"
);
}
}

pub fn check(path: &Path, bad: &mut bool) {
Expand Down