[SCM] Git repository for devscripts branch, master, updated. v2.12.4-171-g8910c5f
Benjamin Drung
bdrung at debian.org
Tue Feb 19 16:44:32 UTC 2013
The following commit has been merged in the master branch:
commit 98ee81cb8998f463d7cc1470dfc7ae4b32f8b22d
Author: Laurent Rineau <laurent.rineau at cgal.org>
Date: Tue Feb 19 15:08:17 2013 +0100
Fix clean_comments()
The detection of the comments pattern was using the last match of the
regular expression. That is better to use the first one.
diff --git a/scripts/licensecheck.pl b/scripts/licensecheck.pl
index f2c076b..9331c0e 100755
--- a/scripts/licensecheck.pl
+++ b/scripts/licensecheck.pl
@@ -353,16 +353,17 @@ sub parse_copyright {
sub clean_comments {
local $_ = shift or return q{};
+ my $first_match;
# Remove generic comments: look for 4 or more lines beginning with
# regular comment pattern and trim it. Fall back to old algorithm
# if no such pattern found.
- if( 4 <= scalar(()=m{ ^\s*
+ if( 4 <= scalar(($first_match)=m{ ^\s*
([^a-zA-Z0-9\s]{1,3})
\s\w
}xmg)
){
- my $comment_length=length($1);
+ my $comment_length=length($first_match);
my $comment_re=qr{\s* [$1]{${comment_length}} \s*}x;
s/^$comment_re//mg;
}
--
Git repository for devscripts
More information about the devscripts-devel
mailing list