-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.swiftformat
53 lines (38 loc) · 1.49 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
#----------------#
# Opt-In Rules #
#----------------#
--enable marktypes
#--------------------#
# Rule Configuration #
#--------------------#
# Sets a common header on all files
--header "Copyright © {year} Kyle Haptonstall."
# Don't add MARKs to type definitions.
--marktypes "never"
# Overrides the default MARK format for grouped extensions ("MARK: %c") to include a "-".
--groupedextension "MARK: - %c"
# Makes sure the self. prefix is added where appropriate.
--self insert
# Only strips unused arguments (replacing with _) in closures, not methods.
--stripunusedargs closure-only
# Only trims whitespace on nonblank-lines to avoid Xcode inconsistencies.
--trimwhitespace nonblank-lines
#----------------#
# Disabled Rules #
#----------------#
# Add "@available(*, unavailable)" attribute to "required init(coder:)" when it hasn't been implemented.
# Disabled because this rule can trigger incorrectly and create breaking changes.
--disable initCoderUnavailable
# Convert trivial "map { $0.foo }" closures to keyPath-based syntax.
# Disabled for false positive matches creating breaking changes.
--disable preferKeyPath
# Removes return within closures as well as the new Swift 5 implicit return.
# Disabled because this rule is non-configurable.
--disable redundantReturn
# Wrap the opening brace of multiline statements.
# Disabled because this rule is non-configurable.
--disable wrapMultilineStatementBraces
#-----------------#
# File Exclusions #
#-----------------#
--exclude */Package.swift