Skip to content

Commit 85f759a

Browse files
committed
Problem: inconsistent code style
Solution: copy .clang-format from `libzmq` as a starting point. There is no need to follow exactly what libzmq does but it seems reasonable starting point. It would be good to stick to one style as there is a lot of activity and good ideas lately.
1 parent 0f840ce commit 85f759a

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

.clang-format

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
BasedOnStyle: LLVM
2+
IndentWidth: 4
3+
UseTab: Never
4+
BreakBeforeBraces: Custom
5+
BraceWrapping:
6+
AfterClass: true
7+
AfterControlStatement: false
8+
AfterEnum: true
9+
AfterFunction: true
10+
AfterNamespace: true
11+
AfterObjCDeclaration: true
12+
AfterStruct: true
13+
AfterUnion: true
14+
BeforeCatch: true
15+
BeforeElse: false
16+
IndentBraces: false
17+
18+
AlignConsecutiveAssignments: false
19+
AlignConsecutiveDeclarations: false
20+
AllowShortIfStatementsOnASingleLine: false
21+
IndentCaseLabels: true
22+
BinPackArguments: true
23+
BinPackParameters: false
24+
AlignTrailingComments: true
25+
AllowShortBlocksOnASingleLine: false
26+
AllowAllParametersOfDeclarationOnNextLine: true
27+
AllowShortFunctionsOnASingleLine: InlineOnly
28+
AlwaysBreakTemplateDeclarations: false
29+
ColumnLimit: 80
30+
MaxEmptyLinesToKeep: 2
31+
KeepEmptyLinesAtTheStartOfBlocks: false
32+
ContinuationIndentWidth: 2
33+
PointerAlignment: Right
34+
ReflowComments: false
35+
SpaceBeforeAssignmentOperators: true
36+
SpaceBeforeParens: Always
37+
SpaceInEmptyParentheses: false
38+
SpacesInAngles: false
39+
SpacesInParentheses: false
40+
SpacesInSquareBrackets: false
41+
Standard: Cpp11
42+
43+
SortIncludes: false
44+
45+
FixNamespaceComments: false
46+
BreakBeforeBinaryOperators: NonAssignment
47+
SpaceAfterTemplateKeyword: true
48+
AlignAfterOpenBracket: Align
49+
AlignOperands: true
50+
BreakConstructorInitializers: AfterColon
51+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
52+
SpaceAfterCStyleCast: true
53+
BreakBeforeTernaryOperators: true

0 commit comments

Comments
 (0)