• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6# http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13---
14Language:        Cpp
15BasedOnStyle:  Google
16AccessModifierOffset: -4
17AlignAfterOpenBracket: Align
18AlignConsecutiveAssignments: false
19AlignConsecutiveDeclarations: false
20AlignEscapedNewlines: Left
21AlignOperands:   true
22AlignTrailingComments: true
23AllowAllParametersOfDeclarationOnNextLine: true
24AllowShortBlocksOnASingleLine: false
25AllowShortCaseLabelsOnASingleLine: false
26AllowShortFunctionsOnASingleLine: Empty
27AllowShortIfStatementsOnASingleLine: false
28AllowShortLoopsOnASingleLine: false
29AlwaysBreakAfterDefinitionReturnType: None
30AlwaysBreakAfterReturnType: None
31AlwaysBreakBeforeMultilineStrings: true
32AlwaysBreakTemplateDeclarations: true
33BinPackArguments: true
34BinPackParameters: true
35BraceWrapping:
36  AfterClass:      false
37  AfterControlStatement: false
38  AfterEnum:       false
39  AfterFunction:   true
40  AfterNamespace:  false
41  AfterObjCDeclaration: false
42  AfterStruct:     false
43  AfterUnion:      false
44  AfterExternBlock: false
45  BeforeCatch:     false
46  BeforeElse:      false
47  IndentBraces:    false
48  SplitEmptyFunction: true
49  SplitEmptyRecord: true
50  SplitEmptyNamespace: true
51BreakBeforeBinaryOperators: None
52BreakBeforeBraces: Custom
53BreakBeforeInheritanceComma: false
54BreakBeforeTernaryOperators: true
55BreakConstructorInitializersBeforeComma: false
56BreakConstructorInitializers: BeforeColon
57BreakAfterJavaFieldAnnotations: false
58BreakStringLiterals: true
59ColumnLimit:     120
60CommentPragmas:  '^ IWYU pragma:'
61CompactNamespaces: false
62ConstructorInitializerAllOnOneLineOrOnePerLine: true
63ConstructorInitializerIndentWidth: 4
64ContinuationIndentWidth: 4
65Cpp11BracedListStyle: true
66DerivePointerAlignment: false
67DisableFormat:   false
68ExperimentalAutoDetectBinPacking: false
69FixNamespaceComments: true
70ForEachMacros:
71  - foreach
72  - Q_FOREACH
73  - BOOST_FOREACH
74IncludeBlocks:   Regroup
75IncludeCategories:
76  - Regex:           '^<ext/.*\.h>'
77    Priority:        2
78  - Regex:           '^<.*\.h>'
79    Priority:        1
80  - Regex:           '^<.*'
81    Priority:        2
82  - Regex:           '.*'
83    Priority:        3
84IncludeIsMainRegex: '([-_](test|unittest))?$'
85IndentCaseLabels: true
86IndentPPDirectives: None
87IndentWidth:     4
88IndentWrappedFunctionNames: false
89JavaScriptQuotes: Leave
90JavaScriptWrapImports: true
91KeepEmptyLinesAtTheStartOfBlocks: false
92MacroBlockBegin: ''
93MacroBlockEnd:   ''
94MaxEmptyLinesToKeep: 1
95NamespaceIndentation: None
96ObjCBlockIndentWidth: 4
97ObjCSpaceAfterProperty: false
98ObjCSpaceBeforeProtocolList: true
99PenaltyBreakAssignment: 2
100PenaltyBreakBeforeFirstCallParameter: 19
101PenaltyBreakComment: 300
102PenaltyBreakFirstLessLess: 120
103PenaltyBreakString: 1000
104PenaltyExcessCharacter: 1000000
105PenaltyReturnTypeOnItsOwnLine: 200
106PointerAlignment: Right
107ReflowComments:  true
108SortIncludes:    false
109SortUsingDeclarations: true
110SpaceAfterCStyleCast: false
111SpaceAfterTemplateKeyword: true
112SpaceBeforeAssignmentOperators: true
113SpaceBeforeCpp11BracedList: true
114SpaceBeforeParens: ControlStatements
115SpaceInEmptyParentheses: false
116SpacesBeforeTrailingComments: 2
117SpacesInAngles:  false
118SpacesInContainerLiterals: false
119SpacesInCStyleCastParentheses: false
120SpacesInParentheses: false
121SpacesInSquareBrackets: false
122Standard:        Cpp11
123TabWidth:        4
124UseTab:          Never
125...
126
127