summaryrefslogtreecommitdiff
path: root/tools/patman/checkpatch.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-07-05 21:41:49 -0600
committerSimon Glass <sjg@chromium.org>2020-07-20 11:37:46 -0600
commitf36537597583a75f357b3927b1e5d816822c90db (patch)
treebdcd7d258d0606fba19c2e33b9b5ea5263e35d35 /tools/patman/checkpatch.py
parent2e9a0cdfa8456636392f24dcc47e3270bd4818b7 (diff)
patman: Move main code out to a control module
To make testing easier, move the code out from main into a separate 'control' module and split it into four parts: setup, preparing patches, checking patches and emailing patches. Add comments and fix a few code-style issues while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/patman/checkpatch.py')
-rw-r--r--tools/patman/checkpatch.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/patman/checkpatch.py b/tools/patman/checkpatch.py
index 07c3e2739a..263bac3fc9 100644
--- a/tools/patman/checkpatch.py
+++ b/tools/patman/checkpatch.py
@@ -41,6 +41,12 @@ def FindCheckPatch():
def CheckPatch(fname, verbose=False, show_types=False):
"""Run checkpatch.pl on a file.
+ Args:
+ fname: Filename to check
+ verbose: True to print out every line of the checkpatch output as it is
+ parsed
+ show_types: Tell checkpatch to show the type (number) of each message
+
Returns:
namedtuple containing:
ok: False=failure, True=ok