This repository was archived by the owner on Mar 2, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathswiftformat
More file actions
125 lines (113 loc) · 2.66 KB
/
swiftformat
File metadata and controls
125 lines (113 loc) · 2.66 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# Version
--swiftversion 6.0
# Basic Formatting
--indent 4
--maxwidth 120
--linebreaks lf
--trimwhitespace always
--smarttabs enabled
--tabwidth unspecified
--xcodeindentation enabled
# Braces and Spacing
--allman false
--emptybraces no-space
--elseposition same-line
--guardelse auto
--operatorfunc spaced
--ranges spaced
--nospaceoperators ...
--nowrapoperators
--enable spaceAroundComments
--enable spaceInsideComments
--enable spaceInsideBrackets
--enable braces
# Wrapping
--wraparguments before-first
--wrapcollections before-first
--wrapconditions after-first
--wrapparameters before-first
--wrapreturntype preserve
--wrapenumcases always
--wraptypealiases preserve
--enable wrapEnumCases
--enable wrapSwitchCases
--disable wrapMultilineStatementBraces
# Numbers and Literals
--binarygrouping 4,8
--decimalgrouping 3,6
--fractiongrouping disabled
--hexgrouping 4,8
--octalgrouping 4,8
--hexliteralcase uppercase
--exponentcase lowercase
--exponentgrouping disabled
--assetliterals visual-width
# Code Style
--acronyms ID,URL,UUID
--anonymousforeach convert
--closingparen balanced
--closurevoid preserve
--commas inline
--conflictmarkers reject
--fragment false
--onelineforeach ignore
--patternlet hoist
--semicolons inline
--shortoptionals always
--someany true
--voidtype tuple
--yodaswap always
# Access Control and Modifiers
--modifierorder public,private,fileprivate,internal,final,override,static,lazy,weak,unowned,mutating,nonmutating,convenience,required,indirect,isolated,nonisolated
# Organization
--organizetypes actor,class,enum,struct
--enumnamespaces always
--importgrouping testable-last
# Marks and Documentation
--beforemarks
--categorymark "MARK: %c"
--extensionmark "MARK: - %t + %c"
--groupedextension "MARK: %c"
--typemark "MARK: - %t"
--lineaftermarks true
--markcategories true
--markextensions always
--marktypes always
--enable markTypes
--doccomments before-declarations
--header preserve
# Thresholds
--classthreshold 0
--enumthreshold 0
--extensionlength 0
--structthreshold 0
# Attributes
--funcattributes preserve
--typeattributes preserve
--varattributes preserve
# Code Cleanup
--redundanttype inferred
--self remove
--stripunusedargs closure-only
--typeblanklines remove
# Additional Rules
--enable isEmpty
--enable blankLinesBetweenScopes
--enable consecutiveSpaces
--enable duplicateImports
--enable redundantParens
--enable redundantSelf
--enable redundantReturn
--enable redundantGet
--enable redundantFileprivate
--enable redundantRawValues
--enable redundantLetError
--enable redundantPattern
--enable redundantVoidReturnType
--enable sortImports
--enable strongifiedSelf
--enable todos
--enable trailingSpace
--enable void
--enable unusedArguments
--enable indent