-
Notifications
You must be signed in to change notification settings - Fork 64
/
.swiftformat
48 lines (33 loc) · 993 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
36
37
38
39
40
41
42
43
44
45
46
47
48
--exclude Sources/MongoSwift/MongoSwiftVersion.swift,Sources/MongoSwiftSync/Exports.swift
--exclude **/.build
--exclude etc
--exclude opt
# unnecessary
--disable andOperator
# put #if to the first column
--ifdef "outdent"
# 4 spaces
--indent 4
# 0..<3 vs 0 ..< 3
--nospaceoperators ...,..<
# always want explicit acl
--disable redundantExtensionACL
# always want explicit self
--self insert
# don't need semicolons
--semicolons "never"
--disable trailingCommas
# first element of collection on newline after opening brace/bracket
--wrapcollections "before-first"
# put first argument on its own line
--wraparguments "before-first"
# if x == 1 vs if 1 == x
--disable yodaConditions
# the ordering doesn't match linter's
--disable specifiers
# conflicts with our Swiftlint explicit ACL rule
--disable extensionAccessControl
# creates non-compiling code on Swift 5.1
--disable preferKeyPath
# swift version 5.1.5 requires backticks in argument lists.
--disable redundantBackticks