From: openocd-gerrit <ope...@us...> - 2024-08-25 12:37:25
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via ceae51ad74ba3a16be3e7ee2df4743a6df3cd097 (commit) from bfd3110e59f5b13c075823c654f1a51cfcd66d4d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit ceae51ad74ba3a16be3e7ee2df4743a6df3cd097 Author: Antonio Borneo <bor...@gm...> 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 <bor...@gm...> Reviewed-on: https://review.openocd.org/c/openocd/+/8424 Reviewed-by: Karl Palsson <ka...@tw...> Tested-by: jenkins diff --git a/tools/scripts/checkpatch.pl b/tools/scripts/checkpatch.pl index 26589beab..a2f89eac8 100755 --- a/tools/scripts/checkpatch.pl +++ b/tools/scripts/checkpatch.pl @@ -2384,6 +2384,10 @@ sub show_type { sub report { my ($level, $type, $msg) = @_; + # OpenOCD specific: Begin: Flatten ERROR, WARNING and CHECK as ERROR + $level = 'ERROR'; + # OpenOCD specific: End + if (!show_type($type) || (defined $tst_only && $msg !~ /\Q$tst_only\E/)) { return 0; @@ -7638,9 +7642,15 @@ sub process { print report_dump(); if ($summary && !($clean == 1 && $quiet == 1)) { print "$filename " if ($summary_file); + if (!$OpenOCD) { print "total: $cnt_error errors, $cnt_warn warnings, " . (($check)? "$cnt_chk checks, " : "") . "$cnt_lines lines checked\n"; + } # $OpenOCD + # OpenOCD specific: Begin: Report total as errors + my $total = $cnt_error + $cnt_warn + $cnt_chk; + print "total: $total errors, $cnt_lines lines checked\n"; + # OpenOCD specific: End } if ($quiet == 0) { ----------------------------------------------------------------------- Summary of changes: tools/scripts/checkpatch.pl | 10 ++++++++++ 1 file changed, 10 insertions(+) hooks/post-receive -- Main OpenOCD repository |