-
Notifications
You must be signed in to change notification settings - Fork 211
/
.swiftformat
35 lines (30 loc) · 947 Bytes
/
.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
# Stream rules
--header "\nCopyright © {year} Stream.io Inc. All rights reserved.\n"
--swiftversion 5.6
--ifdef no-indent
--disable redundantType
--disable extensionAccessControl
--disable andOperator
--disable hoistPatternLet
--disable typeSugar
--disable redundantGet # it removes get async throws from getters
# Rules inferred from Swift Standard Library:
--disable anyObjectProtocol, wrapMultilineStatementBraces
--indent 4
--enable isEmpty
--disable redundantParens # it generates mistakes for e.g. "if (a || b), let x = ... {}"
--semicolons inline
--nospaceoperators ..., ..< # what about ==, +=?
--commas inline
--trimwhitespace nonblank-lines
--stripunusedargs closure-only
--binarygrouping 4,7
--octalgrouping none
--hexgrouping none
--fractiongrouping disabled
--exponentgrouping disabled
--hexliteralcase lowercase
--exponentcase lowercase
--wraparguments before-first
--wrapparameters before-first
--wrapcollections before-first