blob: 04b712148600bd00e36b7347ff6ae9b42d7c1121 [file] [log] [blame]
Amnaae4d4612023-08-08 16:58:42 -04001# 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---
8Language: Cpp
9AccessModifierOffset: -4
10AlignAfterOpenBracket: Align
11AlignConsecutiveAssignments: false
12AlignConsecutiveDeclarations: false
13AlignConsecutiveMacros: true
14AlignEscapedNewlines: DontAlign
15AlignOperands: true
16AlignTrailingComments: true
17AllowAllParametersOfDeclarationOnNextLine: true
18AllowShortBlocksOnASingleLine: false
19AllowShortCaseLabelsOnASingleLine: false
20AllowShortFunctionsOnASingleLine: Inline
21AllowShortIfStatementsOnASingleLine: false
22AllowShortLambdasOnASingleLine: Inline
23AllowShortLoopsOnASingleLine: false
24AlwaysBreakAfterReturnType: TopLevelDefinitions
25AlwaysBreakBeforeMultilineStrings: false
26AlwaysBreakTemplateDeclarations: Yes
27BinPackArguments: false
28BinPackParameters: false
29BraceWrapping:
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
44BreakBeforeBinaryOperators: All
45BreakBeforeBraces: Custom
46BreakBeforeInheritanceComma: false
47BreakBeforeTernaryOperators: true
48BreakConstructorInitializersBeforeComma: false
49BreakConstructorInitializers: BeforeComma
50BreakAfterJavaFieldAnnotations: false
51BreakStringLiterals: true
52ColumnLimit: 100
53CommentPragmas: '^ IWYU pragma:'
54CompactNamespaces: false
55ConstructorInitializerAllOnOneLineOrOnePerLine: false
56ConstructorInitializerIndentWidth: 4
57ContinuationIndentWidth: 4
58Cpp11BracedListStyle: true
59DerivePointerAlignment: false
60DisableFormat: false
61ExperimentalAutoDetectBinPacking: false
62FixNamespaceComments: true
63ForEachMacros:
64 - forever # avoids { wrapped to next line
65 - foreach
66 - Q_FOREACH
67 - BOOST_FOREACH
68IncludeCategories:
69 - Regex: '^<Q.*'
70 Priority: 200
71IncludeIsMainRegex: '(Test)?$'
72IndentCaseLabels: false
73IndentWidth: 4
74IndentWrappedFunctionNames: false
75JavaScriptQuotes: Leave
76JavaScriptWrapImports: true
77KeepEmptyLinesAtTheStartOfBlocks: false
78MacroBlockBegin: ""
79MacroBlockEnd: ""
80MaxEmptyLinesToKeep: 1
81NamespaceIndentation: None
82ObjCBlockIndentWidth: 4
83ObjCSpaceAfterProperty: false
84ObjCSpaceBeforeProtocolList: true
85PenaltyBreakAssignment: 150
86PenaltyBreakBeforeFirstCallParameter: 300
87PenaltyBreakComment: 500
88PenaltyBreakFirstLessLess: 400
89PenaltyBreakString: 600
90PenaltyExcessCharacter: 50
91PenaltyReturnTypeOnItsOwnLine: 300
92PointerAlignment: Left
93ReflowComments: true
94SortIncludes: false
95SortUsingDeclarations: false
96SpaceAfterCStyleCast: true
97SpaceAfterTemplateKeyword: false
98SpaceBeforeAssignmentOperators: true
99SpaceBeforeCpp11BracedList: true
100SpaceBeforeParens: ControlStatements
101SpaceInEmptyParentheses: false
102SpacesBeforeTrailingComments: 1
103SpacesInAngles: false
104SpacesInContainerLiterals: false
105SpacesInCStyleCastParentheses: false
106SpacesInParentheses: false
107SpacesInSquareBrackets: false
108Standard: Cpp11
109TabWidth: 4
110UseTab: Never