The branch main has been updated by imp:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=c2f5306c64e7e44390c6f21179d696bfdea3260b

commit c2f5306c64e7e44390c6f21179d696bfdea3260b
Author:     Warner Losh <[email protected]>
AuthorDate: 2024-02-02 06:15:13 +0000
Commit:     Warner Losh <[email protected]>
CommitDate: 2024-02-02 06:15:13 +0000

    checkstyle9.pl: Correct github output
    
    Change the : between file and line to a ,. This should fix this...
    
    Sponsored by:           Netflix
---
 tools/build/checkstyle9.pl | 15 ++++++++-------
 1 file 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);

Reply via email to