Skip to content

Commit b759c2d

Browse files
committed
Advise the user on how to suppress the file length tidy error
1 parent aa388f1 commit b759c2d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/tools/tidy/src/style.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,13 @@ pub fn check(path: &Path, bad: &mut bool) {
213213
n => tidy_error!(bad, "{}: too many trailing newlines ({})", file.display(), n),
214214
};
215215
if !skip_file_length && lines > LINES {
216-
tidy_error!(bad, "{}: too many lines ({})", file.display(), 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+
);
217223
}
218224

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

0 commit comments

Comments
 (0)