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

[lintian] 04/06: c/cruft.pm: Add some no-backtrack markers to FAQ regex



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

nthykier pushed a commit to branch master
in repository lintian.

commit 2fa66b8219c37e4d3aa5f7a30a658265157967a1
Author: Niels Thykier <niels@thykier.net>
Date:   Sun Sep 6 11:46:58 2015 +0200

    c/cruft.pm: Add some no-backtrack markers to FAQ regex
    
    Signed-off-by: Niels Thykier <niels@thykier.net>
---
 checks/cruft.pm | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/checks/cruft.pm b/checks/cruft.pm
index bab5591..43a4c35 100644
--- a/checks/cruft.pm
+++ b/checks/cruft.pm
@@ -973,13 +973,13 @@ sub _linelength_test {
         $strip =~ s/^\s+//g;
         # from perl faq strip comments
         $strip =~ s#
-                     /\*[^*]*\*+([^/*][^*]*\*+)*/
+                     /\*[^*]*+\*++([^/*][^*]*+\*++)*/
 
                   |  //([^\\]|[^\n][\n]?)*?(?=\n)
                   |  (
-                         "(\\.|[^"\\])*"
-                       | '(\\.|[^'\\])*'
-                       | .[^/"'\\]*
+                         "(\\.|[^"\\]++)*"
+                       | '(\\.|[^'\\]++)*'
+                       | .[^/"'\\]*+
                      )
                    #defined $3 ? $3 : ""#xgse;
         # strip empty line

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


Reply to: