diff options
author | Garret Kelly <gdk@google.com> | 2018-11-05 09:46:16 -0500 |
---|---|---|
committer | Garret Kelly <gdk@google.com> | 2018-11-05 12:03:44 -0500 |
commit | 2b80b79d8efb970a560f7bf47e1927c09cccf173 (patch) | |
tree | 814379849612545dbfcbd04c6202a5edc5e0a783 | |
parent | 39bb60375ba64e98d7fb8331f0dc27eee8685e2d (diff) | |
download | android-2b80b79d8efb970a560f7bf47e1927c09cccf173.tar.gz |
Enforce well-formatted source and commit messages
Import the .clang-format style from AOSP, and use a minimal checkpatch
primarily for checking the commit message format.
Bug: 118324743
Test: attempted to upload malformed change
Change-Id: Id1ca32c05281fbeaab0e65eed40abb4195567a4e
Signed-off-by: Garret Kelly <gdk@google.com>
-rw-r--r-- | .checkpatch.conf | 7 | ||||
-rw-r--r-- | .clang-format | 11 |
2 files changed, 18 insertions, 0 deletions
diff --git a/.checkpatch.conf b/.checkpatch.conf new file mode 100644 index 0000000..e8e9db6 --- /dev/null +++ b/.checkpatch.conf @@ -0,0 +1,7 @@ +# Not Linux, so don't expect a Linux tree. +--no-tree + +# Ignore aspects we don't follow here. +--ignore FILE_PATH_CHANGES +--ignore GIT_COMMIT_ID +--ignore SPLIT_STRING diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..7453c4d --- /dev/null +++ b/.clang-format @@ -0,0 +1,11 @@ +BasedOnStyle: Google +AccessModifierOffset: -2 +AllowShortFunctionsOnASingleLine: Inline +ColumnLimit: 80 +CommentPragmas: NOLINT:.* +DerivePointerAlignment: false +IndentWidth: 4 +ContinuationIndentWidth: 8 +PointerAlignment: Left +TabWidth: 4 +UseTab: Never |