diff options
author | Gunnar Mills <gmills@us.ibm.com> | 2020-06-04 18:11:30 +0300 |
---|---|---|
committer | Gunnar Mills <gmills@us.ibm.com> | 2020-06-11 23:46:30 +0300 |
commit | 1214b7e7d921e331fb1480c7e5d579ffa5811cda (patch) | |
tree | c0e38d55a89ab9df8ce112b190926b00c0a71da1 /.clang-format | |
parent | 29d2a95ba12f8b5abed040df7fd59790d6ba2517 (diff) | |
download | bmcweb-1214b7e7d921e331fb1480c7e5d579ffa5811cda.tar.xz |
clang-format: update to latest from docs repo
This is from openbmc/docs/style/cpp/.clang-format
Other OpenBMC repos are doing the same.
Tested: Built and validator passed.
Change-Id: Ief26c755c9ce012823e16a506342b0547a53517a
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
Diffstat (limited to '.clang-format')
-rw-r--r-- | .clang-format | 40 |
1 files changed, 28 insertions, 12 deletions
diff --git a/.clang-format b/.clang-format index d17cf52d4b..52ac0a17d4 100644 --- a/.clang-format +++ b/.clang-format @@ -5,7 +5,7 @@ AccessModifierOffset: -2 AlignAfterOpenBracket: Align AlignConsecutiveAssignments: false AlignConsecutiveDeclarations: false -AlignEscapedNewlinesLeft: false +AlignEscapedNewlines: Right AlignOperands: true AlignTrailingComments: true AllowAllParametersOfDeclarationOnNextLine: true @@ -14,14 +14,13 @@ AllowShortCaseLabelsOnASingleLine: false AllowShortFunctionsOnASingleLine: None AllowShortIfStatementsOnASingleLine: false AllowShortLoopsOnASingleLine: false -AlwaysBreakAfterDefinitionReturnType: None AlwaysBreakAfterReturnType: None AlwaysBreakBeforeMultilineStrings: false -AlwaysBreakTemplateDeclarations: false +AlwaysBreakTemplateDeclarations: Yes BinPackArguments: true BinPackParameters: true BraceWrapping: - AfterCaseLabel: true + AfterCaseLabel: true AfterClass: true AfterControlStatement: true AfterEnum: true @@ -30,20 +29,27 @@ BraceWrapping: AfterObjCDeclaration: true AfterStruct: true AfterUnion: true + AfterExternBlock: true BeforeCatch: true BeforeElse: true IndentBraces: false + SplitEmptyFunction: false + SplitEmptyRecord: false + SplitEmptyNamespace: false BreakBeforeBinaryOperators: None BreakBeforeBraces: Custom BreakBeforeTernaryOperators: true BreakConstructorInitializers: AfterColon +BreakInheritanceList: AfterColon +BreakStringLiterals: true ColumnLimit: 80 CommentPragmas: '^ IWYU pragma:' +CompactNamespaces: false ConstructorInitializerAllOnOneLineOrOnePerLine: false ConstructorInitializerIndentWidth: 4 ContinuationIndentWidth: 4 Cpp11BracedListStyle: true -DerivePointerAlignment: true +DerivePointerAlignment: false PointerAlignment: Left DisableFormat: false ExperimentalAutoDetectBinPacking: false @@ -52,17 +58,21 @@ ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ] IncludeBlocks: Regroup IncludeCategories: - Regex: '^[<"](gtest|gmock)' - Priority: 5 + Priority: 7 - Regex: '^"config.h"' Priority: -1 - - Regex: '^".*\.hpp"' + - Regex: '^".*\.h"' Priority: 1 - - Regex: '^<.*\.h>' + - Regex: '^".*\.hpp"' Priority: 2 - - Regex: '^<.*' + - Regex: '^<.*\.h>' Priority: 3 - - Regex: '.*' + - Regex: '^<.*\.hpp>' Priority: 4 + - Regex: '^<.*' + Priority: 5 + - Regex: '.*' + Priority: 6 IndentCaseLabels: true IndentWidth: 4 IndentWrappedFunctionNames: true @@ -80,12 +90,17 @@ PenaltyBreakFirstLessLess: 120 PenaltyBreakString: 1000 PenaltyExcessCharacter: 1000000 PenaltyReturnTypeOnItsOwnLine: 60 -PointerAlignment: Right ReflowComments: true SortIncludes: true +SortUsingDeclarations: true SpaceAfterCStyleCast: false +SpaceAfterTemplateKeyword: true SpaceBeforeAssignmentOperators: true +SpaceBeforeCpp11BracedList: false +SpaceBeforeCtorInitializerColon: true +SpaceBeforeInheritanceColon: true SpaceBeforeParens: ControlStatements +SpaceBeforeRangeBasedForLoopColon: true SpaceInEmptyParentheses: false SpacesBeforeTrailingComments: 1 SpacesInAngles: false @@ -93,7 +108,8 @@ SpacesInContainerLiterals: true SpacesInCStyleCastParentheses: false SpacesInParentheses: false SpacesInSquareBrackets: false -Standard: Cpp11 +Standard: Latest TabWidth: 4 UseTab: Never ... + |