]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Do not preserve empty DEBUGs.
authorThe Squid Software Foundation <>
Fri, 4 Oct 2013 03:43:12 +0000 (21:43 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Fri, 4 Oct 2013 03:43:12 +0000 (21:43 -0600)
scripts/boiler-mgr.pl

index 8dc1e0f989108cbefa2847fe7ca80b6f25c01f8f..ef840b0e62c5fda80b9b497b7b8965d9704a01ab 100755 (executable)
@@ -28,11 +28,16 @@ my $reComment = qr{
        /\*.*?\*/
 }xs;
 
-# Debugging section inside a boilerplate comment
+# Debugging section inside a boilerplate comment.
 my $reDebug = qr{
        ^[\s*]*(DEBUG:.*?)$
 }mx;
 
+# Same as $reDebug, but does not match empty DEBUG: statements.
+my $reDebugFull = qr{
+       ^[\s*]*(DEBUG:[^\S\n]*\S.*?)\s*$
+}mx;
+
 # Copyright-related claims inside a boilerplate comment
 my $reClaims = qr{
        (
@@ -122,7 +127,7 @@ foreach my $fname (@FileNames) {
        my $extras = ''; # DEBUG section, inspired by ..., etc.
 
        if (defined $boiler) {
-               if ($boiler =~ m/$reDebug/) {
+               if ($boiler =~ m/$reDebugFull/) {
                        $extras .= "/* $1 */\n\n";
                }