Skip to content

Commit

Permalink
checkstyle9.pl: Correct github output
Browse files Browse the repository at this point in the history
Change the : between file and line to a ,. This should fix this...

Sponsored by:		Netflix
  • Loading branch information
bsdimp committed Feb 2, 2024
1 parent 33326dd commit c2f5306
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions tools/build/checkstyle9.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit c2f5306

Please sign in to comment.