]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>
Mon, 19 Dec 2022 22:32:40 +0000 (17:32 -0500)
committerSimon Glass <sjg@chromium.org>
Fri, 6 Jan 2023 02:21:57 +0000 (19:21 -0700)
This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
tools/patman/checkpatch.py

index d1b902dd9627df18f6a984a1143ebc51e4cd75ff..012c0d895cb3c9b346be9b10ddfb8a7d49ce5d54 100644 (file)
@@ -211,7 +211,7 @@ def check_patch(fname, verbose=False, show_types=False, use_tree=False):
             stdout: Full output of checkpatch
     """
     chk = find_check_patch()
-    args = [chk]
+    args = [chk, '--u-boot', '--strict']
     if not use_tree:
         args.append('--no-tree')
     if show_types: