summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYu-Ping Wu <yupingso@chromium.org>2021-08-02 17:46:21 +0800
committerCommit Bot <commit-bot@chromium.org>2021-08-13 02:50:43 +0000
commit8e3b876858a975d35af249126a41a3e260a5c844 (patch)
tree09353081e9eb1f363e70c47eba95bb3049e1a180
parent5a4e00419e645148b80e000793f25abd9c80674f (diff)
downloadvboot-stabilize-14151.B.tar.gz
PRESUBMIT.cfg: Enable checkpatch_checkstabilize-14151.B
Since vboot code uses kernel coding style, enable checkpatch_check. The checkpatch.pl script already checks for long lines, so disable long_line_check. The latter is inaccurate anyways (a tab is considered of length 1). Copy .checkpatch.conf from depthcharge and also ignore MACRO_WITH_FLOW_CONTROL for the VB2_TRY macro. BUG=none TEST=repo upload . --cbr BRANCH=none Change-Id: I60d78c47a6723062718d23dc1e74137a56d0d28c Signed-off-by: Yu-Ping Wu <yupingso@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3067205 Reviewed-by: Julius Werner <jwerner@chromium.org>
-rw-r--r--.checkpatch.conf20
-rw-r--r--PRESUBMIT.cfg4
2 files changed, 24 insertions, 0 deletions
diff --git a/.checkpatch.conf b/.checkpatch.conf
new file mode 100644
index 00000000..cadd68f3
--- /dev/null
+++ b/.checkpatch.conf
@@ -0,0 +1,20 @@
+# Not Linux, so don't expect a Linux tree.
+--no-tree
+
+# Ignore aspects we don't follow here.
+--ignore BLOCK_COMMENT_STYLE
+--ignore C99_COMMENTS
+--ignore CAMELCASE
+--ignore CONFIG_DESCRIPTION
+--ignore GLOBAL_INITIALISERS
+--ignore INITIALISED_STATIC
+--ignore LINE_SPACING
+--ignore MACRO_WITH_FLOW_CONTROL
+--ignore NEW_TYPEDEFS
+--ignore OPEN_BRACE
+--ignore PREFER_ALIGNED
+--ignore PREFER_PACKED
+--ignore PREFER_PRINTF
+--ignore SPACING
+--ignore SPLIT_STRING
+--ignore TRAILING_STATEMENTS
diff --git a/PRESUBMIT.cfg b/PRESUBMIT.cfg
index 8770083a..54d538d5 100644
--- a/PRESUBMIT.cfg
+++ b/PRESUBMIT.cfg
@@ -1,8 +1,12 @@
[Hook Overrides]
branch_check: true
+checkpatch_check: true
+long_line_check: false
signoff_check: true
# We are using Linux style indentation with tabs
# The indentation is checked by checkpatch not the python script
tab_check: false
+[Hook Overrides Options]
+cros_license_check: --exclude_regex=^\.checkpatch\.conf$