common/tools/brag/logToBRAG.pl
changeset 578 75fa4158340a
parent 576 7be9799d1a41
child 579 78b42fd9e2c4
--- 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 <failures> tag for this severity