about summary refs log tree commit diff
path: root/src/tools
diff options
context:
space:
mode:
authoribraheemdev <ibrah1440@gmail.com>2021-07-25 17:10:51 -0400
committeribraheemdev <ibrah1440@gmail.com>2021-07-25 17:10:51 -0400
commit3171bd5bf54fb91f7f7df7c40df5adc7d8bd5dea (patch)
treea28245620e6213dfe11e58fc74e1d648b520f023 /src/tools
parent70f74719a92ef52bc28610ba04b7e98ada035ec9 (diff)
downloadrust-3171bd5bf54fb91f7f7df7c40df5adc7d8bd5dea.tar.gz
rust-3171bd5bf54fb91f7f7df7c40df5adc7d8bd5dea.zip
ignore comments in tidy-filelength
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/tidy/src/style.rs5
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());