aboutsummaryrefslogtreecommitdiff
path: root/contrib/conf/editors/clang-format
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/conf/editors/clang-format')
-rw-r--r--contrib/conf/editors/clang-format121
1 files changed, 121 insertions, 0 deletions
diff --git a/contrib/conf/editors/clang-format b/contrib/conf/editors/clang-format
new file mode 100644
index 000000000..97493b58a
--- /dev/null
+++ b/contrib/conf/editors/clang-format
@@ -0,0 +1,121 @@
1---
2Language: Cpp
3# BasedOnStyle: LLVM
4AccessModifierOffset: -2
5AlignAfterOpenBracket: Align
6AlignConsecutiveAssignments: false
7AlignConsecutiveDeclarations: false
8AlignEscapedNewlines: Right
9AlignOperands: true
10AlignTrailingComments: true
11AllowAllParametersOfDeclarationOnNextLine: true
12AllowShortBlocksOnASingleLine: false
13AllowShortCaseLabelsOnASingleLine: false
14AllowShortFunctionsOnASingleLine: All
15AllowShortIfStatementsOnASingleLine: false
16AllowShortLoopsOnASingleLine: false
17AlwaysBreakAfterDefinitionReturnType: None
18AlwaysBreakAfterReturnType: TopLevel
19AlwaysBreakBeforeMultilineStrings: false
20AlwaysBreakTemplateDeclarations: MultiLine
21BinPackArguments: true
22BinPackParameters: true
23BraceWrapping:
24 AfterClass: false
25 AfterControlStatement: false
26 AfterEnum: false
27 AfterFunction: true
28 AfterNamespace: false
29 AfterObjCDeclaration: false
30 AfterStruct: true
31 AfterUnion: true
32 AfterExternBlock: false
33 BeforeCatch: false
34 BeforeElse: false
35 IndentBraces: false
36 SplitEmptyFunction: true
37 SplitEmptyRecord: true
38 SplitEmptyNamespace: true
39BreakBeforeBinaryOperators: None
40BreakBeforeBraces: Custom
41BreakBeforeInheritanceComma: false
42BreakInheritanceList: BeforeColon
43BreakBeforeTernaryOperators: true
44BreakConstructorInitializersBeforeComma: false
45BreakConstructorInitializers: BeforeColon
46BreakAfterJavaFieldAnnotations: false
47BreakStringLiterals: true
48ColumnLimit: 80
49CommentPragmas: '^ IWYU pragma:'
50CompactNamespaces: false
51ConstructorInitializerAllOnOneLineOrOnePerLine: false
52ConstructorInitializerIndentWidth: 4
53ContinuationIndentWidth: 4
54Cpp11BracedListStyle: true
55DerivePointerAlignment: false
56DisableFormat: false
57ExperimentalAutoDetectBinPacking: false
58FixNamespaceComments: true
59ForEachMacros:
60 - foreach
61 - Q_FOREACH
62 - BOOST_FOREACH
63IncludeBlocks: Preserve
64IncludeCategories:
65 - Regex: '^"(llvm|llvm-c|clang|clang-c)/'
66 Priority: 2
67 - Regex: '^(<|"(gtest|gmock|isl|json)/)'
68 Priority: 3
69 - Regex: '.*'
70 Priority: 1
71IncludeIsMainRegex: '(Test)?$'
72IndentCaseLabels: false
73IndentPPDirectives: None
74IndentWidth: 2
75IndentWrappedFunctionNames: false
76JavaScriptQuotes: Leave
77JavaScriptWrapImports: true
78KeepEmptyLinesAtTheStartOfBlocks: true
79MacroBlockBegin: ''
80MacroBlockEnd: ''
81MaxEmptyLinesToKeep: 2
82NamespaceIndentation: None
83ObjCBinPackProtocolList: Auto
84ObjCBlockIndentWidth: 2
85ObjCSpaceAfterProperty: false
86ObjCSpaceBeforeProtocolList: true
87PenaltyBreakAssignment: 2
88PenaltyBreakBeforeFirstCallParameter: 19
89PenaltyBreakComment: 300
90PenaltyBreakFirstLessLess: 120
91PenaltyBreakString: 1000
92PenaltyBreakTemplateDeclaration: 10
93PenaltyExcessCharacter: 1000000
94PenaltyReturnTypeOnItsOwnLine: 60
95PointerAlignment: Right
96ReflowComments: true
97SortIncludes: true
98SortUsingDeclarations: true
99SpaceAfterCStyleCast: false
100SpaceAfterTemplateKeyword: true
101SpaceBeforeAssignmentOperators: true
102SpaceBeforeCpp11BracedList: false
103SpaceBeforeCtorInitializerColon: true
104SpaceBeforeInheritanceColon: true
105SpaceBeforeParens: Always
106SpaceBeforeRangeBasedForLoopColon: true
107SpaceInEmptyParentheses: false
108SpacesBeforeTrailingComments: 1
109SpacesInAngles: false
110SpacesInContainerLiterals: true
111SpacesInCStyleCastParentheses: false
112SpacesInParentheses: false
113SpacesInSquareBrackets: false
114Standard: Cpp11
115StatementMacros:
116 - Q_UNUSED
117 - QT_REQUIRE_VERSION
118TabWidth: 8
119UseTab: Never
120...
121