diff options
author | 2020-07-18 02:24:02 +0000 | |
---|---|---|
committer | 2020-07-18 02:24:02 +0000 | |
commit | 8857e6b645f9b91f44c8ea0ab8f441c9c0d63da6 (patch) | |
tree | 5af7a270ea6f5150ec45e76f76a6c5736284fdb3 | |
parent | 285dfb3126aa8ef1481cf9e0e1e7fdb84a9374a1 (diff) | |
parent | 4c2d3daf6ac9d18dc1add0b9e32568aa2ade1878 (diff) |
Merge "Enable clang-format for frameworks/base"
-rw-r--r-- | .clang-format | 13 | ||||
-rw-r--r-- | PREUPLOAD.cfg | 12 |
2 files changed, 25 insertions, 0 deletions
diff --git a/.clang-format b/.clang-format new file mode 100644 index 000000000000..03af56d64062 --- /dev/null +++ b/.clang-format @@ -0,0 +1,13 @@ +BasedOnStyle: Google + +AccessModifierOffset: -4 +AlignOperands: false +AllowShortFunctionsOnASingleLine: Inline +AlwaysBreakBeforeMultilineStrings: false +ColumnLimit: 100 +CommentPragmas: NOLINT:.* +ConstructorInitializerIndentWidth: 6 +ContinuationIndentWidth: 8 +IndentWidth: 4 +PenaltyBreakBeforeFirstCallParameter: 100000 +SpacesBeforeTrailingComments: 1 diff --git a/PREUPLOAD.cfg b/PREUPLOAD.cfg index 68311176a783..9abb308534df 100644 --- a/PREUPLOAD.cfg +++ b/PREUPLOAD.cfg @@ -1,3 +1,15 @@ +[Builtin Hooks] +clang_format = true + +[Builtin Hooks Options] +# Only turn on clang-format check for the following subfolders. +clang_format = --commit ${PREUPLOAD_COMMIT} --style file --extensions c,h,cc,cpp + cmds/hid/ + cmds/input/ + core/jni/ + libs/input/ + services/core/jni/ + [Hook Scripts] checkstyle_hook = ${REPO_ROOT}/prebuilts/checkstyle/checkstyle.py --sha ${PREUPLOAD_COMMIT} |