aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2024-02-02 07:23:43 +0000
committerWarner Losh <imp@FreeBSD.org>2024-02-02 07:24:32 +0000
commit22d12caad69ef2d8e1c76671b44fd5493490acb7 (patch)
tree9a9d9a67d4e2202a5ad342c9a6b5d7247748a08a /tools
parentac9abe93e83293cb19827a1e6cd898ff40410f47 (diff)
downloadsrc-22d12caad69ef2d8e1c76671b44fd5493490acb7.tar.gz
src-22d12caad69ef2d8e1c76671b44fd5493490acb7.zip
checkstyle9.pl: Differentiate errors and warnings
Use ::error and ::warning as appropriate to give better meaning to the messages. Sponsored by: Netflix
Diffstat (limited to 'tools')
-rwxr-xr-xtools/build/checkstyle9.pl6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/build/checkstyle9.pl b/tools/build/checkstyle9.pl
index dd6eb624e0b4..df9ec2bbd7c1 100755
--- a/tools/build/checkstyle9.pl
+++ b/tools/build/checkstyle9.pl
@@ -1177,6 +1177,8 @@ sub report {
my $output = '';
my $do_color = $color && !$github;
$output .= BOLD if $do_color;
+ $output .= "::error " if $github && $level eq 'ERROR';
+ $output .= "::warning " if $github && $level eq 'WARNING';
$output .= $prefix;
$output .= RED if $do_color && $level eq 'ERROR';
$output .= MAGENTA if $do_color && $level eq 'WARNING';
@@ -1399,8 +1401,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 = "file=$filename,line=$realline:\:" if ($github && $file);
+ $prefix = "file=$realfile,line=$realline:\:" if ($github && !$file);
$here = "#$linenr: " if (!$file);
$here = "#$realline: " if ($file);