diff options
author | Hirokazu Honda <hiroh@google.com> | 2017-12-14 09:46:56 +0900 |
---|---|---|
committer | Johny Lin <johnylin@google.com> | 2017-12-21 10:30:00 +0800 |
commit | f5398e6a069e55e36439f148b8d4004596eecd5b (patch) | |
tree | 1f39dfc9698b9a41aae2345988e0aabf91db51c9 | |
parent | 2737fb61ca7ecd786b160ec5d79e3eaa48135606 (diff) | |
download | v4l2_codec2-f5398e6a069e55e36439f148b8d4004596eecd5b.tar.gz |
Add pre-upload checks
Bug: None
Test: repo upload
Change-Id: I78c285c6e1796b3f3ec118fd81a7f52d0503600f
-rw-r--r-- | .clang-format | 33 | ||||
-rw-r--r-- | PREUPLOAD.cfg | 5 | ||||
-rw-r--r-- | vda/.clang-format | 4 |
3 files changed, 42 insertions, 0 deletions
diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..b043d46 --- /dev/null +++ b/.clang-format @@ -0,0 +1,33 @@ +--- +BasedOnStyle: Google +AllowShortFunctionsOnASingleLine: Inline +AllowShortIfStatementsOnASingleLine: true +AllowShortLoopsOnASingleLine: true +BinPackArguments: true +BinPackParameters: true +CommentPragmas: NOLINT:.* +ContinuationIndentWidth: 8 +DerivePointerAlignment: false +IndentWidth: 4 +PointerAlignment: Left +TabWidth: 4 + +# Deviations from the above file: +# "Don't indent the section label" +AccessModifierOffset: -4 +# "Each line of text in your code should be at most 100 columns long." +ColumnLimit: 100 +# "Constructor initializer lists can be all on one line or with subsequent +# lines indented eight spaces.". clang-format does not support having the colon +# on the same line as the constructor function name, so this is the best +# approximation of that rule, which makes all entries in the list (except the +# first one) have an eight space indentation. +ConstructorInitializerIndentWidth: 6 +# There is nothing in go/droidcppstyle about case labels, but there seems to be +# more code that does not indent the case labels in frameworks/base. +IndentCaseLabels: false +# There have been some bugs in which subsequent formatting operations introduce +# weird comment jumps. +ReflowComments: false +# Android does support C++11 now. +Standard: Cpp11 diff --git a/PREUPLOAD.cfg b/PREUPLOAD.cfg new file mode 100644 index 0000000..cbdf0f1 --- /dev/null +++ b/PREUPLOAD.cfg @@ -0,0 +1,5 @@ +[Builtin Hooks] +clang_format = true + +[Builtin Hooks Options] +clang_format = --commit ${PREUPLOAD_COMMIT} -- style file --extensions h,cpp diff --git a/vda/.clang-format b/vda/.clang-format new file mode 100644 index 0000000..151d19a --- /dev/null +++ b/vda/.clang-format @@ -0,0 +1,4 @@ +# The codes in this directory are ported from Chromium Project. +# Therefore, they are obviously based on Chromium coding style +# and shouldn't be formatted by Android Coding Style +BasedOnStyle: None |