Skip to content

Commit e013fdd

Browse files
committed
Add clang-format rules file
1 parent 6ac7a60 commit e013fdd

File tree

1 file changed

+101
-0
lines changed

1 file changed

+101
-0
lines changed

.clang-format

+101
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
---
2+
Language: Cpp
3+
AccessModifierOffset: -1
4+
AlignAfterOpenBracket: AlwaysBreak
5+
AlignConsecutiveAssignments: false
6+
AlignConsecutiveDeclarations: false
7+
AlignEscapedNewlines: Left
8+
AlignOperands: false
9+
AlignTrailingComments: false
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: true
19+
AlwaysBreakTemplateDeclarations: true
20+
BinPackArguments: false
21+
BinPackParameters: false
22+
BraceWrapping:
23+
AfterClass: false
24+
AfterControlStatement: false
25+
AfterEnum: false
26+
AfterFunction: false
27+
AfterNamespace: false
28+
AfterObjCDeclaration: false
29+
AfterStruct: false
30+
AfterUnion: false
31+
BeforeCatch: false
32+
BeforeElse: false
33+
IndentBraces: false
34+
BreakBeforeBinaryOperators: None
35+
BreakBeforeBraces: Attach
36+
BreakBeforeInheritanceComma: false
37+
BreakBeforeTernaryOperators: true
38+
BreakConstructorInitializersBeforeComma: false
39+
BreakConstructorInitializers: BeforeColon
40+
BreakAfterJavaFieldAnnotations: false
41+
BreakStringLiterals: false
42+
ColumnLimit: 80
43+
CommentPragmas: '^ IWYU pragma:'
44+
CompactNamespaces: false
45+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
46+
ConstructorInitializerIndentWidth: 4
47+
ContinuationIndentWidth: 4
48+
Cpp11BracedListStyle: true
49+
DerivePointerAlignment: false
50+
DisableFormat: false
51+
ExperimentalAutoDetectBinPacking: false
52+
FixNamespaceComments: true
53+
ForEachMacros:
54+
- FOR_EACH_RANGE
55+
- FOR_EACH
56+
- BOOST_FOREACH
57+
IncludeCategories:
58+
- Regex: '^<.*\.h(pp)?>'
59+
Priority: 1
60+
- Regex: '^<.*'
61+
Priority: 2
62+
- Regex: '.*'
63+
Priority: 3
64+
IncludeIsMainRegex: '(Test)?$'
65+
IndentCaseLabels: true
66+
IndentWidth: 2
67+
IndentWrappedFunctionNames: false
68+
JavaScriptQuotes: Leave
69+
JavaScriptWrapImports: true
70+
KeepEmptyLinesAtTheStartOfBlocks: false
71+
MacroBlockBegin: ''
72+
MacroBlockEnd: ''
73+
MaxEmptyLinesToKeep: 1
74+
NamespaceIndentation: None
75+
ObjCBlockIndentWidth: 2
76+
ObjCSpaceAfterProperty: false
77+
ObjCSpaceBeforeProtocolList: false
78+
PenaltyBreakAssignment: 2
79+
PenaltyBreakBeforeFirstCallParameter: 1
80+
PenaltyBreakComment: 300
81+
PenaltyBreakFirstLessLess: 120
82+
PenaltyBreakString: 1000
83+
PenaltyExcessCharacter: 1000000
84+
PenaltyReturnTypeOnItsOwnLine: 200
85+
PointerAlignment: Left
86+
ReflowComments: true
87+
SortIncludes: true
88+
SpaceAfterCStyleCast: false
89+
SpaceAfterTemplateKeyword: true
90+
SpaceBeforeAssignmentOperators: true
91+
SpaceBeforeParens: ControlStatements
92+
SpaceInEmptyParentheses: false
93+
SpacesBeforeTrailingComments: 1
94+
SpacesInAngles: false
95+
SpacesInContainerLiterals: true
96+
SpacesInCStyleCastParentheses: false
97+
SpacesInParentheses: false
98+
SpacesInSquareBrackets: false
99+
Standard: Cpp11
100+
TabWidth: 8
101+
UseTab: Never

0 commit comments

Comments
 (0)