[lintian] 03/06: c/cruft.pm: Reorder FAQ regex by using /x
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit df9eb4e8f5380c2be7ef24eb8d44daf77b5e11ca
Author: Niels Thykier <niels@thykier.net>
Date: Sun Sep 6 11:45:16 2015 +0200
c/cruft.pm: Reorder FAQ regex by using /x
Signed-off-by: Niels Thykier <niels@thykier.net>
---
checks/cruft.pm | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/checks/cruft.pm b/checks/cruft.pm
index a29c0a6..bab5591 100644
--- a/checks/cruft.pm
+++ b/checks/cruft.pm
@@ -972,8 +972,16 @@ sub _linelength_test {
# strip indention
$strip =~ s/^\s+//g;
# from perl faq strip comments
- $strip
- =~ s#/\*[^*]*\*+([^/*][^*]*\*+)*/|//([^\\]|[^\n][\n]?)*?(?=\n)|("(\\.|[^"\\])*"|'(\\.|[^'\\])*'|.[^/"'\\]*)#defined $3 ? $3 : ""#gse;
+ $strip =~ s#
+ /\*[^*]*\*+([^/*][^*]*\*+)*/
+
+ | //([^\\]|[^\n][\n]?)*?(?=\n)
+ | (
+ "(\\.|[^"\\])*"
+ | '(\\.|[^'\\])*'
+ | .[^/"'\\]*
+ )
+ #defined $3 ? $3 : ""#xgse;
# strip empty line
$strip =~ s/^\s*\n//mg;
# remove last \n
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: