Fix false position on style.rs itself

This commit is contained in:
varkor 2019-04-25 21:54:09 +01:00
parent b759c2d714
commit 8c3068784c

View file

@ -212,14 +212,17 @@ pub fn check(path: &Path, bad: &mut bool) {
1 => {}
n => tidy_error!(bad, "{}: too many trailing newlines ({})", file.display(), n),
};
if !skip_file_length && lines > LINES {
tidy_error!(
bad,
"{}: too many lines ({}) (add `// ignore-tidy-filelength` to the file to \
suppress this error)",
file.display(),
lines
);
if lines > LINES {
let mut err = |_| {
tidy_error!(
bad,
"{}: too many lines ({}) (add `// \
ignore-tidy-filelength` to the file to suppress this error)",
file.display(),
lines
);
};
suppressible_tidy_err!(err, skip_file_length, "");
}
if let Directive::Ignore(false) = skip_cr {