From 13f9f29fa8ba9ad5a73a3bcf56708c47988e2c96 Mon Sep 17 00:00:00 2001 From: Antonio Borneo Date: Sun, 21 Jul 2024 13:00:08 +0200 Subject: [PATCH] checkpatch: extend checks to TCL, Makefile.am and configure.ac files The script, originally written for Linux code, skips several tests on files whose name's extension is not in Perl list '(h|c|s|S|sh|dtsi|dts)$'. This causes such tests to not be executed on OpenOCD TCL files and on Makefile.am and configure.ac. Modify the script to include the OpenOCD files in the list. Change-Id: I17c96bf32ee40d9390e60996e176e4e927c00197 Signed-off-by: Antonio Borneo Reviewed-on: https://review.openocd.org/c/openocd/+/8408 Reviewed-by: Marek Kraus Tested-by: jenkins --- tools/scripts/checkpatch.pl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/scripts/checkpatch.pl b/tools/scripts/checkpatch.pl index 9dda61cde..26589beab 100755 --- a/tools/scripts/checkpatch.pl +++ b/tools/scripts/checkpatch.pl @@ -3769,7 +3769,11 @@ sub process { } # check we are in a valid source file if not then ignore this hunk + if (!$OpenOCD) { next if ($realfile !~ /\.(h|c|s|S|sh|dtsi|dts)$/); + } else { # !$OpenOCD + next if ($realfile !~ /\.(h|c|s|S|sh|dtsi|dts|tcl|cfg|ac|am)$/); + } # !$OpenOCD # check for using SPDX-License-Identifier on the wrong line number if ($realline != $checklicenseline &&