aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2024-02-02 06:15:13 +0000
committerWarner Losh <imp@FreeBSD.org>2024-02-02 06:15:13 +0000
commitc2f5306c64e7e44390c6f21179d696bfdea3260b (patch)
tree87c872c8bf159bbc9c4cd90a9695adcd5f5c5f78 /tools
parent33326dd5f5ed1585e370ecd5210f03e56cb3f634 (diff)
downloadsrc-c2f5306c64e7e44390c6f21179d696bfdea3260b.tar.gz
src-c2f5306c64e7e44390c6f21179d696bfdea3260b.zip
checkstyle9.pl: Correct github output
Change the : between file and line to a ,. This should fix this... Sponsored by: Netflix
Diffstat (limited to 'tools')
-rwxr-xr-xtools/build/checkstyle9.pl15
1 files changed, 8 insertions, 7 deletions
diff --git a/tools/build/checkstyle9.pl b/tools/build/checkstyle9.pl
index 8fe9b9f94da1..65f13bc1e7f2 100755
--- a/tools/build/checkstyle9.pl
+++ b/tools/build/checkstyle9.pl
@@ -1175,12 +1175,13 @@ sub report {
}
my $output = '';
- $output .= BOLD if $color;
+ my $do_color = $color && !$github;
+ $output .= BOLD if $do_color;
$output .= $prefix;
- $output .= RED if $color && $level eq 'ERROR';
- $output .= MAGENTA if $color && $level eq 'WARNING';
- $output .= $level . ':';
- $output .= RESET if $color;
+ $output .= RED if $do_color && $level eq 'ERROR';
+ $output .= MAGENTA if $do_color && $level eq 'WARNING';
+ $output .= $level . ':' if !$github;
+ $output .= RESET if $do_color;
$output .= ' ' . $msg . "\n";
$output = (split('\n', $output))[0] . "\n" if ($terse);
@@ -1397,8 +1398,8 @@ sub process {
#make up the handle for any error we report on this line
$prefix = "$filename:$realline: " if ($emacs && $file);
$prefix = "$filename:$linenr: " if ($emacs && !$file);
- $prefix = "::error file=$filename:line=$realline:\:" if ($github && $file);
- $prefix = "::error file=$realfile:line=$linenr:\:" if ($github && !$file);
+ $prefix = "::error file=$filename,line=$realline:\:" if ($github && $file);
+ $prefix = "::error file=$realfile,line=$linenr:\:" if ($github && !$file);
$here = "#$linenr: " if (!$file);
$here = "#$realline: " if ($file);