-
Notifications
You must be signed in to change notification settings - Fork 44
/
.swiftformat
62 lines (58 loc) · 2.86 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
61
62
# These rules are based on the Google style guide
--indent 4
--exclude Pods
--maxwidth 120
--closingparen balanced
--extensionacl on-declarations
--importgrouping testable-bottom
--modifierorder "private,fileprivate,internal,public,open,private(set),fileprivate(set),internal(set),public(set),final,dynamic,optional,required,convenience,override,indirect,lazy,weak,unowned,static,class,mutating,nonmutating,prefix,postfix" # ordering used by the now deprecated specifiers rule
--operatorfunc spaced
--nospaceoperators ...,..<
--shortoptionals always
--voidtype void
--wraparguments before-first
--ifdef no-indent
--header strip
--someAny disabled # opaqueGenericParameters
--rules anyObjectProtocol
--rules blankLinesBetweenScopes
--rules braces # https://google.github.io/swift/#braces
--rules consecutiveSpaces
--rules duplicateImports
--rules elseOnSameLine
--rules emptyBraces
--rules extensionAccessControl
--rules indent
--rules fileHeader
--rules leadingDelimiters
--rules linebreakAtEndOfFile
--rules modifierOrder
--rules opaqueGenericParameters
--rules redundantGet # https://google.github.io/swift/#properties-1
--rules redundantInit # https://google.github.io/swift/#initializers-1
--rules redundantParens # https://google.github.io/swift/#parentheses, https://google.github.io/swift/#enum-cases, https://google.github.io/swift/#trailing-closures
# This is a style choice on top of the Google guide
--rules redundantReturn
# Also a style choice
--rules redundantSelf
--rules redundantVoidReturnType # https://google.github.io/swift/#types-with-shorthand-names
--rules semicolons # https://google.github.io/swift/#semicolons
--rules sortedImports # https://google.github.io/swift/#import-statements
--rules spaceAroundBraces # https://google.github.io/swift/#braces
--rules spaceAroundBrackets # https://google.github.io/swift/#horizontal-whitespace
--rules spaceAroundGenerics # https://google.github.io/swift/#horizontal-whitespace
--rules spaceAroundOperators # https://google.github.io/swift/#horizontal-whitespace
--rules spaceAroundParens
--rules spaceInsideBraces # https://google.github.io/swift/#horizontal-whitespace
--rules spaceInsideBrackets # https://google.github.io/swift/#horizontal-whitespace
--rules spaceInsideComments # https://google.github.io/swift/#other-expressions
--rules spaceInsideGenerics
--rules spaceInsideParens
--rules todos # https://google.github.io/swift/#type-variable-and-function-declarations
--rules trailingClosures # https://google.github.io/swift/#trailing-closures
--rules trailingCommas # https://google.github.io/swift/#trailing-commas
--rules trailingSpace # https://google.github.io/swift/#horizontal-whitespace
--rules typeSugar # https://google.github.io/swift/#types-with-shorthand-names
--rules void # https://google.github.io/swift/#types-with-shorthand-names
--rules wrapArguments
--rules wrapMultilineStatementBraces # https://google.github.io/swift/#braces