From 8e3b876858a975d35af249126a41a3e260a5c844 Mon Sep 17 00:00:00 2001 From: Yu-Ping Wu Date: Mon, 2 Aug 2021 17:46:21 +0800 Subject: PRESUBMIT.cfg: Enable checkpatch_check 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 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3067205 Reviewed-by: Julius Werner --- .checkpatch.conf | 20 ++++++++++++++++++++ PRESUBMIT.cfg | 4 ++++ 2 files changed, 24 insertions(+) create mode 100644 .checkpatch.conf 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$ -- cgit v1.2.1