Skip to content

Commit 2e202e9

Browse files
committed
assert "src/tools/tidy/src/issues.txt" length
Signed-off-by: onur-ozkan <[email protected]>
1 parent 6e5caac commit 2e202e9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/tools/tidy/src/ui_tests.rs

+9
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ fn check_entries(tests_path: &Path, bad: &mut bool) {
100100
}
101101

102102
pub fn check(root_path: &Path, bless: bool, bad: &mut bool) {
103+
// This can be decreased but can never be increased.
104+
const EXPECTED_LINE_COUNT: usize = 4372;
105+
103106
let path = &root_path.join("tests");
104107
check_entries(&path, bad);
105108

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

126+
assert_eq!(
127+
EXPECTED_LINE_COUNT,
128+
allowed_issue_names.len(),
129+
"If you have added new lines to issues.txt, please revert them; otherwise, decrease the EXPECTED_LINE_COUNT."
130+
);
131+
123132
if !is_sorted && !bless {
124133
tidy_error!(
125134
bad,

0 commit comments

Comments
 (0)