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