diff options
| author | bors <bors@rust-lang.org> | 2021-08-06 02:07:01 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-08-06 02:07:01 +0000 |
| commit | 7129033b429d75709d71fb6bf66c0cce2fec77c1 (patch) | |
| tree | 777da77297e143c175425b5b1154636736e939e7 /src/tools | |
| parent | e2f79572fbcbe103346c950d95d7335f6c804d83 (diff) | |
| parent | 3171bd5bf54fb91f7f7df7c40df5adc7d8bd5dea (diff) | |
| download | rust-7129033b429d75709d71fb6bf66c0cce2fec77c1.tar.gz rust-7129033b429d75709d71fb6bf66c0cce2fec77c1.zip | |
Auto merge of #87462 - ibraheemdev:tidy-file-length-ignore-comment, r=Mark-Simulacrum
Ignore comments in tidy-filelength Ref https://github.com/rust-lang/rust/issues/60302#issuecomment-652402127
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/tidy/src/style.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tools/tidy/src/style.rs b/src/tools/tidy/src/style.rs index 15ed2f7a0a9..d8d3dc3ddb1 100644 --- a/src/tools/tidy/src/style.rs +++ b/src/tools/tidy/src/style.rs @@ -344,7 +344,10 @@ pub fn check(path: &Path, bad: &mut bool) { } else { trailing_new_lines = 0; } - lines = i; + + if !line.trim().starts_with("//") { + lines += 1; + } } if leading_new_lines { tidy_error!(bad, "{}: leading newline", file.display()); |
