1# Copyright (c) 2024 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 92LambdaBodyIndentation: Signature 93MacroBlockBegin: '' 94MacroBlockEnd: '' 95MaxEmptyLinesToKeep: 1 96NamespaceIndentation: None 97ObjCBlockIndentWidth: 4 98ObjCSpaceAfterProperty: false 99ObjCSpaceBeforeProtocolList: true 100PenaltyBreakAssignment: 2 101PenaltyBreakBeforeFirstCallParameter: 19 102PenaltyBreakComment: 300 103PenaltyBreakFirstLessLess: 120 104PenaltyBreakString: 1000 105PenaltyExcessCharacter: 1000000 106PenaltyReturnTypeOnItsOwnLine: 200 107PointerAlignment: Right 108ReflowComments: true 109SortIncludes: false 110SortUsingDeclarations: true 111SpaceAfterCStyleCast: false 112SpaceAfterTemplateKeyword: true 113SpaceBeforeAssignmentOperators: true 114SpaceBeforeCpp11BracedList: true 115SpaceBeforeParens: ControlStatements 116SpaceInEmptyParentheses: false 117SpacesBeforeTrailingComments: 2 118SpacesInAngles: false 119SpacesInContainerLiterals: false 120SpacesInCStyleCastParentheses: false 121SpacesInParentheses: false 122SpacesInSquareBrackets: false 123Standard: Cpp11 124TabWidth: 4 125UseTab: Never 126... 127 128