diff options
author | André Draszik <draszik@google.com> | 2023-01-24 15:28:17 +0000 |
---|---|---|
committer | Will McVicker <willmcvicker@google.com> | 2023-11-03 16:29:42 -0700 |
commit | 60a2caba0d70b5527fd82bf2fe936800ff3027c7 (patch) | |
tree | 349762a6cbdd5feaf47e9eba1ddeb07571ba3bde | |
parent | b118ee945b0b9c0c6fdf92269dd1ac193ab214c8 (diff) | |
download | sec_touch-android-gs-raviole-mainline.tar.gz |
PREUPLOAD: add repo upload hookandroid-gs-raviole-mainline
This will cause repo upload to run checkpatch first, so as to
spot issues early, i.e. before presubmit failures in gerrit.
Test: .../tools/repohooks/pre-upload.py
Bug: 266563427
Change-Id: If15d00f395bee19397676aefc8b8b161bdbd190b
Signed-off-by: André Draszik <draszik@google.com>
-rw-r--r-- | .checkpatch.conf | 21 | ||||
-rw-r--r-- | PREUPLOAD.cfg | 11 |
2 files changed, 32 insertions, 0 deletions
diff --git a/.checkpatch.conf b/.checkpatch.conf new file mode 100644 index 0000000..3c35612 --- /dev/null +++ b/.checkpatch.conf @@ -0,0 +1,21 @@ +# SPDX-License-Identifier: GPL-2.0-only +# +# The configs of the Linux checkpatch script +# +# Copyright (c) 2023 Google LLC +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 as +# published by the Free Software Foundation. + +# Showing the diff position is clearer with git-based information +--showfile + +# The Change-Id line is always reserved before submitting +--ignore GERRIT_CHANGE_ID + +# The MAINTAINERS file patterns are not used in current gerrit +--ignore FILE_PATH_CHANGES + +# otherwise it's impossible to add e.g. http-links to commit messages +--ignore COMMIT_LOG_LONG_LINE diff --git a/PREUPLOAD.cfg b/PREUPLOAD.cfg new file mode 100644 index 0000000..fce1d19 --- /dev/null +++ b/PREUPLOAD.cfg @@ -0,0 +1,11 @@ +[Options] +ignore_merged_commits = true + +[Builtin Hooks] +checkpatch = true +commit_msg_bug_field = true +commit_msg_changeid_field = true +commit_msg_test_field = true + +[Builtin Hooks Options] +checkpatch = --root ${REPO_ROOT}/common |