Amna | ae4d461 | 2023-08-08 16:58:42 -0400 | [diff] [blame] | 1 | # Based on the .clang-format for Qt Creator |
| 2 | # |
| 3 | # This is for clang-format >= 10.0. |
| 4 | # |
| 5 | # https://releases.llvm.org/10.0.0/tools/clang/docs/ClangFormatStyleOptions.html |
| 6 | # |
| 7 | --- |
| 8 | Language: Cpp |
| 9 | AccessModifierOffset: -4 |
| 10 | AlignAfterOpenBracket: Align |
| 11 | AlignConsecutiveAssignments: false |
| 12 | AlignConsecutiveDeclarations: false |
| 13 | AlignConsecutiveMacros: true |
| 14 | AlignEscapedNewlines: DontAlign |
| 15 | AlignOperands: true |
| 16 | AlignTrailingComments: true |
| 17 | AllowAllParametersOfDeclarationOnNextLine: true |
| 18 | AllowShortBlocksOnASingleLine: false |
| 19 | AllowShortCaseLabelsOnASingleLine: false |
| 20 | AllowShortFunctionsOnASingleLine: Inline |
| 21 | AllowShortIfStatementsOnASingleLine: false |
| 22 | AllowShortLambdasOnASingleLine: Inline |
| 23 | AllowShortLoopsOnASingleLine: false |
| 24 | AlwaysBreakAfterReturnType: TopLevelDefinitions |
| 25 | AlwaysBreakBeforeMultilineStrings: false |
| 26 | AlwaysBreakTemplateDeclarations: Yes |
| 27 | BinPackArguments: false |
| 28 | BinPackParameters: false |
| 29 | BraceWrapping: |
| 30 | AfterClass: true |
| 31 | AfterControlStatement: false |
| 32 | AfterEnum: false |
| 33 | AfterFunction: true |
| 34 | AfterNamespace: false |
| 35 | AfterObjCDeclaration: false |
| 36 | AfterStruct: true |
| 37 | AfterUnion: false |
| 38 | BeforeCatch: false |
| 39 | BeforeElse: false |
| 40 | IndentBraces: false |
| 41 | SplitEmptyFunction: false |
| 42 | SplitEmptyRecord: false |
| 43 | SplitEmptyNamespace: false |
| 44 | BreakBeforeBinaryOperators: All |
| 45 | BreakBeforeBraces: Custom |
| 46 | BreakBeforeInheritanceComma: false |
| 47 | BreakBeforeTernaryOperators: true |
| 48 | BreakConstructorInitializersBeforeComma: false |
| 49 | BreakConstructorInitializers: BeforeComma |
| 50 | BreakAfterJavaFieldAnnotations: false |
| 51 | BreakStringLiterals: true |
| 52 | ColumnLimit: 100 |
| 53 | CommentPragmas: '^ IWYU pragma:' |
| 54 | CompactNamespaces: false |
| 55 | ConstructorInitializerAllOnOneLineOrOnePerLine: false |
| 56 | ConstructorInitializerIndentWidth: 4 |
| 57 | ContinuationIndentWidth: 4 |
| 58 | Cpp11BracedListStyle: true |
| 59 | DerivePointerAlignment: false |
| 60 | DisableFormat: false |
| 61 | ExperimentalAutoDetectBinPacking: false |
| 62 | FixNamespaceComments: true |
| 63 | ForEachMacros: |
| 64 | - forever # avoids { wrapped to next line |
| 65 | - foreach |
| 66 | - Q_FOREACH |
| 67 | - BOOST_FOREACH |
| 68 | IncludeCategories: |
| 69 | - Regex: '^<Q.*' |
| 70 | Priority: 200 |
| 71 | IncludeIsMainRegex: '(Test)?$' |
| 72 | IndentCaseLabels: false |
| 73 | IndentWidth: 4 |
| 74 | IndentWrappedFunctionNames: false |
| 75 | JavaScriptQuotes: Leave |
| 76 | JavaScriptWrapImports: true |
| 77 | KeepEmptyLinesAtTheStartOfBlocks: false |
| 78 | MacroBlockBegin: "" |
| 79 | MacroBlockEnd: "" |
| 80 | MaxEmptyLinesToKeep: 1 |
| 81 | NamespaceIndentation: None |
| 82 | ObjCBlockIndentWidth: 4 |
| 83 | ObjCSpaceAfterProperty: false |
| 84 | ObjCSpaceBeforeProtocolList: true |
| 85 | PenaltyBreakAssignment: 150 |
| 86 | PenaltyBreakBeforeFirstCallParameter: 300 |
| 87 | PenaltyBreakComment: 500 |
| 88 | PenaltyBreakFirstLessLess: 400 |
| 89 | PenaltyBreakString: 600 |
| 90 | PenaltyExcessCharacter: 50 |
| 91 | PenaltyReturnTypeOnItsOwnLine: 300 |
| 92 | PointerAlignment: Left |
| 93 | ReflowComments: true |
| 94 | SortIncludes: false |
| 95 | SortUsingDeclarations: false |
| 96 | SpaceAfterCStyleCast: true |
| 97 | SpaceAfterTemplateKeyword: false |
| 98 | SpaceBeforeAssignmentOperators: true |
| 99 | SpaceBeforeCpp11BracedList: true |
| 100 | SpaceBeforeParens: ControlStatements |
| 101 | SpaceInEmptyParentheses: false |
| 102 | SpacesBeforeTrailingComments: 1 |
| 103 | SpacesInAngles: false |
| 104 | SpacesInContainerLiterals: false |
| 105 | SpacesInCStyleCastParentheses: false |
| 106 | SpacesInParentheses: false |
| 107 | SpacesInSquareBrackets: false |
| 108 | Standard: Cpp11 |
| 109 | TabWidth: 4 |
| 110 | UseTab: Never |