Skip to content

Commit 895987f

Browse files
James Reedfacebook-github-bot
James Reed
authored andcommitted
Add clang-format style file to caffe2
Summary: Closes facebookarchive/caffe2#1894 Reviewed By: dzhulgakov Differential Revision: D6908057 Pulled By: jamesr66a fbshipit-source-id: 1f5657e7051e2ce77a30d37c1f1c40345651d0fe
1 parent fc856f0 commit 895987f

File tree

1 file changed

+87
-0
lines changed

1 file changed

+87
-0
lines changed

caffe2/.clang-format

+87
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
---
2+
AccessModifierOffset: -1
3+
AlignAfterOpenBracket: AlwaysBreak
4+
AlignConsecutiveAssignments: false
5+
AlignConsecutiveDeclarations: false
6+
AlignEscapedNewlinesLeft: true
7+
AlignOperands: false
8+
AlignTrailingComments: false
9+
AllowAllParametersOfDeclarationOnNextLine: false
10+
AllowShortBlocksOnASingleLine: false
11+
AllowShortCaseLabelsOnASingleLine: false
12+
AllowShortFunctionsOnASingleLine: Empty
13+
AllowShortIfStatementsOnASingleLine: false
14+
AllowShortLoopsOnASingleLine: false
15+
AlwaysBreakAfterReturnType: None
16+
AlwaysBreakBeforeMultilineStrings: true
17+
AlwaysBreakTemplateDeclarations: true
18+
BinPackArguments: false
19+
BinPackParameters: false
20+
BraceWrapping:
21+
AfterClass: false
22+
AfterControlStatement: false
23+
AfterEnum: false
24+
AfterFunction: false
25+
AfterNamespace: false
26+
AfterObjCDeclaration: false
27+
AfterStruct: false
28+
AfterUnion: false
29+
BeforeCatch: false
30+
BeforeElse: false
31+
IndentBraces: false
32+
BreakBeforeBinaryOperators: None
33+
BreakBeforeBraces: Attach
34+
BreakBeforeTernaryOperators: true
35+
BreakConstructorInitializersBeforeComma: false
36+
BreakAfterJavaFieldAnnotations: false
37+
BreakStringLiterals: false
38+
ColumnLimit: 80
39+
CommentPragmas: '^ IWYU pragma:'
40+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
41+
ConstructorInitializerIndentWidth: 4
42+
ContinuationIndentWidth: 4
43+
Cpp11BracedListStyle: true
44+
DerivePointerAlignment: false
45+
DisableFormat: false
46+
ForEachMacros: [ FOR_EACH_RANGE, FOR_EACH, ]
47+
IncludeCategories:
48+
- Regex: '^<.*\.h(pp)?>'
49+
Priority: 1
50+
- Regex: '^<.*'
51+
Priority: 2
52+
- Regex: '.*'
53+
Priority: 3
54+
IndentCaseLabels: true
55+
IndentWidth: 2
56+
IndentWrappedFunctionNames: false
57+
KeepEmptyLinesAtTheStartOfBlocks: false
58+
MacroBlockBegin: ''
59+
MacroBlockEnd: ''
60+
MaxEmptyLinesToKeep: 1
61+
NamespaceIndentation: None
62+
ObjCBlockIndentWidth: 2
63+
ObjCSpaceAfterProperty: false
64+
ObjCSpaceBeforeProtocolList: false
65+
PenaltyBreakBeforeFirstCallParameter: 1
66+
PenaltyBreakComment: 300
67+
PenaltyBreakFirstLessLess: 120
68+
PenaltyBreakString: 1000
69+
PenaltyExcessCharacter: 1000000
70+
PenaltyReturnTypeOnItsOwnLine: 200
71+
PointerAlignment: Left
72+
ReflowComments: true
73+
SortIncludes: true
74+
SpaceAfterCStyleCast: false
75+
SpaceBeforeAssignmentOperators: true
76+
SpaceBeforeParens: ControlStatements
77+
SpaceInEmptyParentheses: false
78+
SpacesBeforeTrailingComments: 1
79+
SpacesInAngles: false
80+
SpacesInContainerLiterals: true
81+
SpacesInCStyleCastParentheses: false
82+
SpacesInParentheses: false
83+
SpacesInSquareBrackets: false
84+
Standard: Cpp11
85+
TabWidth: 8
86+
UseTab: Never
87+
...

0 commit comments

Comments
 (0)