-
Notifications
You must be signed in to change notification settings - Fork 60
/
.swiftformat
35 lines (28 loc) · 1.04 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
# file options
--swiftversion 5.4
--exclude .build
--exclude "**/*.pb.swift"
--exclude "**/*+GenActor.swift"
--exclude "**/*+GenCodable.swift"
--exclude "**/*+XPCProtocolStub.swift"
--disable redundantParens # https://github.com/nicklockwood/SwiftFormat/issues/638
# format options
--ifdef no-indent
--patternlet inline
--self insert
--stripunusedargs closure-only
--wraparguments before-first
# rules
--disable blankLinesAroundMark
# since we sometimes MUST invoke MetaType.init explicitly (and not doing so is a compile error)
--disable redundantInit
--disable redundantGet
--disable redundantReturn
# enum namespaces does not understand some instances of code where an instance
# IS necessary because of how dynamic member lookup is used; or we even create
# instances manually, since we must have *member methods* for dynamic lookup
# to work.
--disable enumNamespaces
# we want to have fine grained control over extensions by marking each function
# explicitly, rather than it being forced onto the extension entirely.
--extensionacl on-declarations