[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[lintian] 03/04: Strip indention for line length test



This is an automated email from the git hooks/post-receive script.

broucaries-guest pushed a commit to branch master
in repository lintian.

commit 42b50158b7955b6084279112b3cdf255db8f2caa
Author: Bastien ROUCARIÈS <roucaries.bastien+debian@gmail.com>
Date:   Sun Aug 30 17:13:23 2015 +0200

    Strip indention for line length test
---
 checks/cruft.pm | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/checks/cruft.pm b/checks/cruft.pm
index 6d59263..09f05bb 100644
--- a/checks/cruft.pm
+++ b/checks/cruft.pm
@@ -964,6 +964,8 @@ sub _linelength_test {
 # now try to be more clever and work only on the 8192 character in order to avoid
 # regexp recursion problems
         my $strip = substr($block,0,8192);
+        # strip indention
+        $strip =~ s/^\s+//g;
         # from perl faq strip comments
         $strip
           =~ s#/\*[^*]*\*+([^/*][^*]*\*+)*/|//([^\\]|[^\n][\n]?)*?(?=\n)|("(\\.|[^"\\])*"|'(\\.|[^'\\])*'|.[^/"'\\]*)#defined $3 ? $3 : ""#gse;
@@ -971,9 +973,8 @@ sub _linelength_test {
         $strip =~ s/^\s*\n//mg;
         # remove last \n
         $strip =~ s/\n\Z//m;
-        _linelength_test_maxlength_ok(
-            $entry, $info, $name, $basename, $dirname, $strip,256
-          );
+        _linelength_test_maxlength_ok($entry, $info, $name, $basename,
+            $dirname, $strip,256);
     }
     return;
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: