diff options
| author | ibraheemdev <ibrah1440@gmail.com> | 2021-07-25 17:10:51 -0400 |
|---|---|---|
| committer | ibraheemdev <ibrah1440@gmail.com> | 2021-07-25 17:10:51 -0400 |
| commit | 3171bd5bf54fb91f7f7df7c40df5adc7d8bd5dea (patch) | |
| tree | a28245620e6213dfe11e58fc74e1d648b520f023 /src/tools | |
| parent | 70f74719a92ef52bc28610ba04b7e98ada035ec9 (diff) | |
| download | rust-3171bd5bf54fb91f7f7df7c40df5adc7d8bd5dea.tar.gz rust-3171bd5bf54fb91f7f7df7c40df5adc7d8bd5dea.zip | |
ignore comments in tidy-filelength
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()); |
