|
| 1 | +--- |
| 2 | +### |
| 3 | +# clang-format Version 12.0.0 |
| 4 | +# https://releases.llvm.org/12.0.0/tools/clang/docs/ClangFormatStyleOptions.html |
| 5 | +# |
| 6 | +# Everything in this block is related to the Barr C Coding Standard 2018 |
| 7 | +# Inspired by; |
| 8 | +# https://github.com/petertorelli/clang-format-barr-c/blob/master/.clang-format |
| 9 | + |
| 10 | +Language: Cpp |
| 11 | +AccessModifierOffset: -4 |
| 12 | +AlignAfterOpenBracket: Align |
| 13 | +AlignConsecutiveAssignments: true |
| 14 | +AlignConsecutiveDeclarations: true |
| 15 | +AlignConsecutiveMacros: true |
| 16 | +AlignEscapedNewlines: Left |
| 17 | +AlignOperands: true |
| 18 | +AlignTrailingComments: true |
| 19 | +AllowAllArgumentsOnNextLine: true |
| 20 | +AllowAllConstructorInitializersOnNextLine: true |
| 21 | +AllowAllParametersOfDeclarationOnNextLine: true |
| 22 | +AllowShortBlocksOnASingleLine: Never |
| 23 | +AllowShortCaseLabelsOnASingleLine: false |
| 24 | +AllowShortFunctionsOnASingleLine: None |
| 25 | +AllowShortIfStatementsOnASingleLine: Never |
| 26 | +AllowShortLoopsOnASingleLine: false |
| 27 | +AlwaysBreakAfterDefinitionReturnType: TopLevel |
| 28 | +AlwaysBreakAfterReturnType: TopLevelDefinitions |
| 29 | +AlwaysBreakBeforeMultilineStrings: true |
| 30 | +AlwaysBreakTemplateDeclarations: true |
| 31 | +BinPackArguments: false |
| 32 | +BinPackParameters: false |
| 33 | +BreakBeforeBinaryOperators: All |
| 34 | +BreakBeforeBraces: Allman |
| 35 | +BreakBeforeInheritanceComma: false |
| 36 | +BreakBeforeTernaryOperators: true |
| 37 | +BreakConstructorInitializersBeforeComma: false |
| 38 | +BreakInheritanceList: BeforeComma |
| 39 | +BreakStringLiterals: true |
| 40 | +ColumnLimit: 120 |
| 41 | +CommentPragmas: '^ IWYU pragma:' |
| 42 | +CompactNamespaces: false |
| 43 | +ConstructorInitializerAllOnOneLineOrOnePerLine: false |
| 44 | +ConstructorInitializerIndentWidth: 4 |
| 45 | +ContinuationIndentWidth: 4 |
| 46 | +Cpp11BracedListStyle: false |
| 47 | +DeriveLineEnding: true |
| 48 | +DerivePointerAlignment: false |
| 49 | +DisableFormat: false |
| 50 | +ExperimentalAutoDetectBinPacking: false |
| 51 | +FixNamespaceComments: false |
| 52 | +ForEachMacros: |
| 53 | + - foreach |
| 54 | + - Q_FOREACH |
| 55 | + - BOOST_FOREACH |
| 56 | +IncludeBlocks: Preserve |
| 57 | +IncludeCategories: |
| 58 | + - Regex: '^"(llvm|llvm-c|clang|clang-c)/' |
| 59 | + Priority: 2 |
| 60 | + SortPriority: 0 |
| 61 | + - Regex: '^(<|"(gtest|gmock|isl|json)/)' |
| 62 | + Priority: 3 |
| 63 | + SortPriority: 0 |
| 64 | + - Regex: '.*' |
| 65 | + Priority: 1 |
| 66 | + SortPriority: 0 |
| 67 | +IncludeIsMainRegex: '(Test)?$' |
| 68 | +IncludeIsMainSourceRegex: '' |
| 69 | +IndentCaseLabels: true |
| 70 | +IndentGotoLabels: true |
| 71 | +IndentPPDirectives: None |
| 72 | +IndentWidth: 4 |
| 73 | +IndentWrappedFunctionNames: false |
| 74 | +KeepEmptyLinesAtTheStartOfBlocks: true |
| 75 | +MacroBlockBegin: '' |
| 76 | +MacroBlockEnd: '' |
| 77 | +MaxEmptyLinesToKeep: 1 |
| 78 | +NamespaceIndentation: None |
| 79 | +PenaltyBreakAssignment: 2 |
| 80 | +PenaltyBreakBeforeFirstCallParameter: 19 |
| 81 | +PenaltyBreakComment: 300 |
| 82 | +PenaltyBreakFirstLessLess: 120 |
| 83 | +PenaltyBreakString: 1000 |
| 84 | +PenaltyBreakTemplateDeclaration: 10 |
| 85 | +PenaltyExcessCharacter: 1000000 |
| 86 | +PenaltyReturnTypeOnItsOwnLine: 200 |
| 87 | +PointerAlignment: Right |
| 88 | +ReflowComments: true |
| 89 | +SortIncludes: false |
| 90 | +SortUsingDeclarations: false |
| 91 | +SpaceAfterCStyleCast: false |
| 92 | +SpaceAfterLogicalNot: false |
| 93 | +SpaceAfterTemplateKeyword: false |
| 94 | +SpaceAroundPointerQualifiers: Both |
| 95 | +SpaceBeforeAssignmentOperators: true |
| 96 | +SpaceBeforeCpp11BracedList: true |
| 97 | +SpaceBeforeCtorInitializerColon: true |
| 98 | +SpaceBeforeInheritanceColon: true |
| 99 | +SpaceBeforeParens: ControlStatements |
| 100 | +SpaceBeforeSquareBrackets: false |
| 101 | +SpaceBeforeRangeBasedForLoopColon: true |
| 102 | +SpaceInEmptyBlock: false |
| 103 | +SpaceInEmptyParentheses: false |
| 104 | +SpacesBeforeTrailingComments: 1 |
| 105 | +SpacesInAngles: false |
| 106 | +SpacesInConditionalStatement: false |
| 107 | +SpacesInContainerLiterals: false |
| 108 | +SpacesInCStyleCastParentheses: false |
| 109 | +SpacesInParentheses: false |
| 110 | +SpacesInSquareBrackets: false |
| 111 | +Standard: Latest |
| 112 | +StatementMacros: |
| 113 | + - Q_UNUSED |
| 114 | + - QT_REQUIRE_VERSION |
| 115 | +TabWidth: 4 |
| 116 | +UseCRLF: false |
| 117 | +UseTab: Never |
| 118 | +... |
0 commit comments