Skip to content

Commit 8c30687

Browse files
committed
Fix false position on style.rs itself
1 parent b759c2d commit 8c30687

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

src/tools/tidy/src/style.rs

+11-8
Original file line numberDiff line numberDiff line change
@@ -212,14 +212,17 @@ pub fn check(path: &Path, bad: &mut bool) {
212212
1 => {}
213213
n => tidy_error!(bad, "{}: too many trailing newlines ({})", file.display(), n),
214214
};
215-
if !skip_file_length && lines > LINES {
216-
tidy_error!(
217-
bad,
218-
"{}: too many lines ({}) (add `// ignore-tidy-filelength` to the file to \
219-
suppress this error)",
220-
file.display(),
221-
lines
222-
);
215+
if lines > LINES {
216+
let mut err = |_| {
217+
tidy_error!(
218+
bad,
219+
"{}: too many lines ({}) (add `// \
220+
ignore-tidy-filelength` to the file to suppress this error)",
221+
file.display(),
222+
lines
223+
);
224+
};
225+
suppressible_tidy_err!(err, skip_file_length, "");
223226
}
224227

225228
if let Directive::Ignore(false) = skip_cr {

0 commit comments

Comments
 (0)