Merge "Enable clang-format for frameworks/base"

This commit is contained in:
Treehugger Robot
2020-07-18 02:24:02 +00:00
committed by Gerrit Code Review
2 changed files with 25 additions and 0 deletions

13
.clang-format Normal file
View File

@@ -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

View File

@@ -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}