Skip to content

Commit 3de5557

Browse files
Added swiftformat file
1 parent f0be767 commit 3de5557

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.swiftformat

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Stream rules
2+
--header "\nCopyright © {year} Stream.io Inc. All rights reserved.\n"
3+
--swiftversion 5.2
4+
5+
--ifdef no-indent
6+
--disable redundantType
7+
--disable extensionAccessControl
8+
--disable andOperator
9+
10+
# Rules inferred from Swift Standard Library:
11+
--disable anyObjectProtocol, wrapMultilineStatementBraces
12+
--indent 4
13+
--enable isEmpty
14+
--disable redundantParens # it generates mistakes for e.g. "if (a || b), let x = ... {}"
15+
--semicolons inline
16+
--nospaceoperators ..., ..< # what about ==, +=?
17+
--commas inline
18+
--trimwhitespace nonblank-lines
19+
--stripunusedargs closure-only
20+
--maxwidth 132
21+
22+
--binarygrouping 4,7
23+
--octalgrouping none
24+
--hexgrouping none
25+
--fractiongrouping disabled
26+
--exponentgrouping disabled
27+
--hexliteralcase lowercase
28+
--exponentcase lowercase
29+
30+
--wraparguments before-first
31+
--wrapparameters before-first
32+
--wrapcollections before-first

0 commit comments

Comments
 (0)