-
Notifications
You must be signed in to change notification settings - Fork 0
/
.swiftformat
129 lines (125 loc) · 3.41 KB
/
.swiftformat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
--swiftversion 5.7
# format options
--elseposition same-line # elseOnSameLine
--guardelse next-line # elseOnSameLine
--emptybraces no-space # emptyBraces
--extensionacl on-declarations # extensionAccessControl
--patternlet inline # hoistPatternLet
# --xcodeindentation enabled
--self init-only # redundantSelf
--selfrequired debug,error,info,warning
--hexliteralcase uppercase
--redundanttype inferred # redundantType
# --importgrouping testable-bottom # sortedImports
--trimwhitespace always # trailingSpace
--commas always # trailingCommas
--maxwidth 140 # wrap
--wrapternary before-operators # wrap
--wraparguments before-first # wrapArguments
--wrapparameters before-first # wrapArguments
--wrapcollections before-first # wrapArguments
--closingparen balanced # wrapArguments
--wrapreturntype preserve # wrapArguments
--wrapconditions after-first # wrapArguments
--wraptypealiases before-first # wrapArguments
--funcattributes prev-line # wrapAttributes
--typeattributes prev-line # wrapAttributes
--indent 4 # indent
--ifdef no-indent # indent
--indentcase false # indent
--indentstrings true # indent
--allman false
--header strip
--ranges no-space
# Enabled format rules:
# --rules acronyms
# --rules andOperator
--rules anyObjectProtocol
--rules assertionFailures
--rules blankLineAfterImports
# --rules blankLinesAroundMark
--rules blankLinesAtEndOfScope
# --rules blankLinesAtStartOfScope
--rules blankLinesBetweenImports
--rules blankLinesBetweenScopes
--rules blockComments
--rules braces
--rules conditionalAssignment
--rules consecutiveBlankLines
--rules consecutiveSpaces
# --rules docComments
--rules duplicateImports
--rules elseOnSameLine
--rules emptyBraces
--rules enumNamespaces
--rules extensionAccessControl
--rules fileHeader
--rules genericExtensions
# This one isn't written well and causes compilation errors.
# --rules hoistAwait
--rules hoistPatternLet
--rules hoistTry
--rules indent
--rules initCoderUnavailable
--rules isEmpty
--rules leadingDelimiters
--rules linebreakAtEndOfFile
--rules linebreaks
# --rules markTypes
--rules modifierOrder
--rules numberFormatting
# --rules opaqueGenericParameters
# --rules organizeDeclarations
--rules preferKeyPath
--rules redundantBackticks
--rules redundantBreak
--rules redundantClosure
--rules redundantExtensionACL
--rules redundantFileprivate
--rules redundantGet
--rules redundantInit
--rules redundantLet
--rules redundantLetError
--rules redundantNilInit
--rules redundantObjc
--rules redundantOptionalBinding
--rules redundantParens
--rules redundantPattern
# --rules redundantRawValues
--rules redundantReturn
--rules redundantSelf
--rules redundantType
--rules redundantVoidReturnType
--rules semicolons
# --rules sortDeclarations
# --rules sortedImports
# --rules sortedSwitchCases
--rules spaceAroundBraces
--rules spaceAroundBrackets
--rules spaceAroundComments
--rules spaceAroundGenerics
--rules spaceAroundOperators
--rules spaceAroundParens
--rules spaceInsideBraces
--rules spaceInsideBrackets
--rules spaceInsideComments
--rules spaceInsideGenerics
--rules spaceInsideParens
--rules strongOutlets
--rules strongifiedSelf
--rules todos
--rules trailingClosures
--rules trailingCommas
--rules trailingSpace
--rules typeSugar
# --rules unusedArguments
--rules void
# --rules wrap
--rules wrapArguments
--rules wrapAttributes
# --rules wrapConditionalBodies
--rules wrapEnumCases
# --rules wrapMultilineStatementBraces
--rules wrapSingleLineComments
# --rules wrapSwitchCases
--rules yodaConditions