This is an automated email from Gerrit.

"Antonio Borneo <borneo.anto...@gmail.com>" just uploaded a new patch set to 
Gerrit, which you can find at https://review.openocd.org/c/openocd/+/8424

-- gerrit

commit 893789c95f7c1ebbc1f2b44f4564d8a41d68247f
Author: Antonio Borneo <borneo.anto...@gmail.com>
Date:   Thu Aug 1 10:43:41 2024 +0200

    checkpatch: only report error on hit
    
    The Linux checkpatch script used by OpenOCD reports hits either as
    error, warning and check.
    Such classification is meaningful for Linux maintainers, but for
    OpenOCD Jenkins they are all considered as errors.
    
    Having such classification in the checkpatch report by Jenkins is
    misleading for developers that expect 'warnings' to be probably
    ignored by maintainers, while having no idea what 'checks' means.
    
    This patch flattens all the checkpatch reports to 'error' only.
    
    Checkpatch can trigger false positives. OpenOCD uses the tag
            Checkpatch-ignore:
    in the commit message to prevent Jenkins to report the error, as
    described in HACKING.
    
    Change-Id: I1d3164ba1f725c0763dfe362192ffa669b3856e6
    Signed-off-by: Antonio Borneo <borneo.anto...@gmail.com>

diff --git a/tools/scripts/checkpatch.pl b/tools/scripts/checkpatch.pl
index 9dda61cde0..ec7666f875 100755
--- a/tools/scripts/checkpatch.pl
+++ b/tools/scripts/checkpatch.pl
@@ -2384,6 +2384,11 @@ sub show_type {
 sub report {
        my ($level, $type, $msg) = @_;
 
+       if ($OpenOCD) {
+               # Flatten ERROR, WARNING and CHECK as ERROR
+               $level = 'ERROR';
+       } # $OpenOCD
+
        if (!show_type($type) ||
            (defined $tst_only && $msg !~ /\Q$tst_only\E/)) {
                return 0;
@@ -7634,9 +7639,14 @@ sub process {
        print report_dump();
        if ($summary && !($clean == 1 && $quiet == 1)) {
                print "$filename " if ($summary_file);
+               if ($OpenOCD) {
+                       my $total = $cnt_error + $cnt_warn + $cnt_chk;
+                       print "total: $total errors, $cnt_lines lines 
checked\n";
+               } else { # $OpenOCD
                print "total: $cnt_error errors, $cnt_warn warnings, " .
                        (($check)? "$cnt_chk checks, " : "") .
                        "$cnt_lines lines checked\n";
+               } # $OpenOCD
        }
 
        if ($quiet == 0) {

-- 

Reply via email to