• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Copyright (C) 2020 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#      http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
17BasedOnStyle: Google
18AllowShortFunctionsOnASingleLine: Inline
19AllowShortIfStatementsOnASingleLine: true
20AllowShortLoopsOnASingleLine: true
21BinPackArguments: true
22BinPackParameters: true
23ColumnLimit: 100
24CommentPragmas: NOLINT:.*
25ContinuationIndentWidth: 8
26DerivePointerAlignment: false
27IndentWidth: 4
28PointerAlignment: Left
29TabWidth: 4
30
31# Deviations from the above file:
32# "Don't indent the section label"
33AccessModifierOffset: -4
34# "Each line of text in your code should be at most 100 columns long."
35ColumnLimit: 100
36# "Constructor initializer lists can be all on one line or with subsequent
37# lines indented eight spaces.". clang-format does not support having the colon
38# on the same line as the constructor function name, so this is the best
39# approximation of that rule, which makes all entries in the list (except the
40# first one) have an eight space indentation.
41ConstructorInitializerIndentWidth: 6
42# There is nothing in go/droidcppstyle about case labels, but there seems to be
43# more code that does not indent the case labels in frameworks/base.
44IndentCaseLabels: false
45# There have been some bugs in which subsequent formatting operations introduce
46# weird comment jumps.
47ReflowComments: false
48# Android supports C++17 now, but it seems only Cpp11 will work now.
49# "Cpp11 is a deprecated alias for Latest" according to
50# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
51Standard: Cpp11
52