diff --git a/mozilla/webtools/tinderbox/warnings.pl b/mozilla/webtools/tinderbox/warnings.pl index d48e41373fe..bd92e852ad5 100755 --- a/mozilla/webtools/tinderbox/warnings.pl +++ b/mozilla/webtools/tinderbox/warnings.pl @@ -204,7 +204,7 @@ sub build_blame { while (my ($line, $warn_rec) = each %{$lines_hash}) { my $line_rev = $revision_map[$line-1]; my $who = $revision_author{$line_rev}; - my $source_text = join '', @text[$line-4..$line+2]; + my $source_text = join '', @text[$line-3..$line+1]; chomp $source_text; $who = "$who%netscape.com" unless $who =~ /[%]/; @@ -233,6 +233,10 @@ sub print_warnings_as_html { Blamed Build Warnings + + @@ -249,28 +253,30 @@ __END_HEADER || $a cmp $b } keys %who_count) { push @who_list, $who; } + # Summary Table (name, count) # - print ""; + use POSIX; + print "
\n"; my $num_columns = 6; - my $num_per_column = $#who_list / $num_columns; - for (my $ii=0; $ii <= $num_per_column; $ii++) { + my $num_rows = ceil($#who_list / $num_columns); + for (my $ii=0; $ii < $num_rows; $ii++) { print ""; for (my $jj=0; $jj < $num_columns; $jj++) { - my $index = $ii+$jj*$num_per_column + 1; + my $index = $ii + $jj * $num_rows; next if $index > $#who_list; - my $who = $who_list[$index]; - my $count = $who_count{$who}; - my $name = $who; + my $name = $who_list[$index]; + my $count = $who_count{$name}; $name =~ s/%.*//; + print " " x $jj; print ""; + print "\n"; } - print ""; + print "\n"; } - print "
$name"; print ""; print "$count"; - print "  

"; + print "

\n"; # Print all the warnings # @@ -280,11 +286,11 @@ __END_HEADER ($name = $who) =~ s/%.*//; ($email = $who) =~ s/%/@/; - print ""; + print "

"; print "$name"; print " (1 warning)" if $count == 1; print " ($count warnings)" if $count > 1; - print ""; + print "

"; print "\n
    \n"; for $file (sort keys %{$warnings_by_who{$who}}) { @@ -306,9 +312,9 @@ __END_HEADER $total_unblamed_warnings++; } } - print ""; + print "

    " print "Unblamed ($total_unblamed_warnings warnings)"; - print ""; + print "

    "; print "