-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.swiftformat
60 lines (44 loc) · 1.41 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
54
55
56
57
58
59
60
--swiftversion 5.9
# excluded directories and files
--exclude fastlane, Pods, Scripts
# format options
--commas always
--ifdef no-indent
--indent 4
--maxwidth 140
--self remove
--stripunusedargs closure-only
--wraparguments before-first
--wrapparameters before-first
# enabled rules
# Replace consecutive blank lines with a single blank line.
--rules consecutiveBlankLines
# Replace consecutive blank spaces with a single blank space.
--rules consecutiveSpaces
# Indent code in accordance with the scope level.
--rules indent
# Remove unneeded return keyword.
--rules redundantReturn
# Remove explicit self. Defined with option `--self remove`.
--rules redundantSelf
# Sort import statements alphabetically.
--rules sortImports
# Mark unused function arguments with _, but only in closures. Defined with `--unusedArguments closure-only`.
--rules unusedArguments
# Wrap lines that exceed maximum width of 140 characters. Defined with `--maxwidth 140`.
--rules wrap
# Align wrapped function arguments or collection elements. Defined with `--wraparguments` and `--wrapparameters`.
--rules wrapArguments
# disabled rules
--disable acronyms
--disable blankLinesBetweenImports
--disable blockComments
--disable isEmpty
--disable markTypes
--disable numberFormatting
--disable organizeDeclarations
--disable specifiers
--disable sortedSwitchCases
--disable wrapConditionalBodies
--disable wrapEnumCases
--disable wrapSwitchCases