# HG changeset patch # User Simon Howkins # Date 1254734432 -3600 # Node ID 75fa4158340a2111535f7f6201a52e0d0947db7b # Parent 424a5ad9bc7dea04921dffecb4d1e1c7fefd8a86 Fixed handling or regular expression strings, so the regular expression functiuonality works, not just substring detection! Added special handling if the severity marker is "ignore". Unsuprisingly, it ignores that line. diff -r 424a5ad9bc7d -r 75fa4158340a common/tools/brag/logToBRAG.pl --- a/common/tools/brag/logToBRAG.pl Fri Oct 02 17:41:04 2009 +0100 +++ b/common/tools/brag/logToBRAG.pl Mon Oct 05 10:20:32 2009 +0100 @@ -84,7 +84,7 @@ next unless $line; my @terms = split m{\t+}, $line; die "Rules file not formatted as expected at line $.\n" unless scalar @terms == 2; - push @rules, { regexp => $terms[0], severity => $terms[1] }; + push @rules, { regexp => qr{$terms[0]}, severity => $terms[1] }; } # Iterate through all the lines of all the files in @ARGV @@ -95,6 +95,7 @@ { if ($line =~ m[$rule->{regexp}]) { + last if $rule->{severity} eq "ignore"; # We found a match my $failure = bless{ Kids => [ bless { Text => $line }, "Characters" ] }, "failure"; # Ensure we have a tag for this severity