From: Ted Kremenek Date: Sun, 21 Sep 2008 06:58:09 +0000 (+0000) Subject: scan-build now prints out bug categories. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ebb7413bbe518fa6230eddebf6e51857b47b5cd3;p=clang scan-build now prints out bug categories. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56395 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/utils/scan-build b/utils/scan-build index 41ef6973ab..0cf170f39b 100755 --- a/utils/scan-build +++ b/utils/scan-build @@ -164,8 +164,8 @@ sub GetHTMLRunDir { $f = $1; } + my @x = split/-/, $f; - next if (scalar(@x) != 4); next if ($x[0] != $year); next if ($x[1] != $month); @@ -336,29 +336,47 @@ sub ScanFile { my $BugDesc = ""; my $BugFile = ""; + my $BugCategory; my $BugPathLength = 1; my $BugLine = 0; - + my $found = 0; + while () { - + + last if ($found == 5); + if (/$/) { $BugDesc = $1; + print "Desc in $BugDesc\n"; + ++$found; } elsif (/$/) { $BugFile = $1; UpdatePrefix($BugFile); + ++$found; } elsif (/$/) { $BugPathLength = $1; + ++$found; } elsif (/$/) { $BugLine = $1; + ++$found; + } + elsif (/$/) { + $BugCategory = $1; + ++$found; } } close(IN); + + if (!defined $BugCategory) { + $BugCategory = "Other"; + } - push @$Index,[ $FName, $BugDesc, $BugFile, $BugLine, $BugPathLength ]; + push @$Index,[ $FName, $BugCategory, $BugDesc, $BugFile, $BugLine, + $BugPathLength ]; } ##----------------------------------------------------------------------------## @@ -436,21 +454,25 @@ print OUT < body { color:#000000; background-color:#ffffff } body { font-family: Helvetica, sans-serif; font-size:9pt } - h1 { font-size:12pt } + h3 { font-size:12pt } + table { font-size:9pt } + table { border-spacing: 0px; border: 1px solid black } table thead { background-color:#eee; color:#666666; font-weight: bold; cursor: default; text-align:center; - border-top: 2px solid #000000; - border-bottom: 2px solid #000000; - font-weight: bold; font-family: Verdana + font-weight: bold; font-family: Verdana; + white-space:nowrap; } - table { border: 1px #000000 solid } - table { border-collapse: collapse; border-spacing: 0px } - td { border-bottom: 1px #000000 dotted } - td { padding:5px; padding-left:8px; padding-right:8px } - td { text-align:left; font-size:9pt } - td.View { padding-left: 10px } + .W { font-size:0px } + th, td { padding:5px; padding-left:8px; text-align:left } + td.SUMM_DESC { padding-left:12px } + td.DESC { white-space:pre } + td.Q { text-align:right } + td { text-align:left } + td.View a { white-space: nowrap; -webkit-appearance:square-button; padding-left:1em; padding-right:1em; padding-top:0.5ex; padding-bottom:0.5ex; text-decoration:none; color:black } + tbody.scrollContent { overflow:auto } +}