Skip to content

Commit

Permalink
log.cgi: highlight go errors, redo errors, and regular redo lines.
Browse files Browse the repository at this point in the history
  • Loading branch information
apenwarr committed Sep 8, 2020
1 parent 8e3276c commit d80af70
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
17 changes: 16 additions & 1 deletion viewer/cgi-bin/log.cgi
Expand Up @@ -85,9 +85,25 @@ while (defined(my $s = <$fh>))
if ($ignore_warnings <= 0 || $xclass !~ /(hint|warning)/i) {
$class = $xclass;
}
} elsif ($s =~ /^(\s*.*\.go:\d+:\d+: .*)/i) {
# errors from go compiler
$class = "error";
$s = ul($1);
} elsif ($s =~ /^(FAIL(\t.*\d+s|$))/) {
# errors from go tests
$class = "error";
$s = ul($1);
} elsif ($s =~ /^\s*(make: \*\*\* .*)/) {
# errors from GNU make
$class = "error";
$s = ul($1);
} elsif ($s =~ /^(redo \s*\S.* \(exit .*)/) {
# errors from redo build system
$class = "error";
$s = ul($1);
} elsif ($s =~ /^(redo \s*\S.*)/) {
$class = "redo";
$s = $1;
} elsif ($s =~ /^!\s*(.*?)\s+(\S+)\s*$/) {
$class = ($2 ne "ok") ? 'error' : 'buildscript';
}
Expand All @@ -96,4 +112,3 @@ while (defined(my $s = <$fh>))
}

close $fh;

2 changes: 1 addition & 1 deletion viewer/log.css
Expand Up @@ -32,7 +32,7 @@ h1 {
font-weight: bold;
}

.msbuild {
.redo, .msbuild {
white-space: pre;
font-family: monospace;
font-weight: bold;
Expand Down

0 comments on commit d80af70

Please sign in to comment.