Skip to content

Commit

Permalink
checkpatch: extend checks to TCL, Makefile.am and configure.ac files
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/8408
Reviewed-by: Marek Kraus <[email protected]>
Tested-by: jenkins
  • Loading branch information
borneoa committed Aug 2, 2024
1 parent 1b5c137 commit 13f9f29
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down

0 comments on commit 13f9f29

Please sign in to comment.