You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Documentation/Configuration.md
+84-4Lines changed: 84 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -137,11 +137,40 @@ top-level keys and values:
137
137
138
138
---
139
139
140
-
## FIXME: fileScopedDeclarationPrivacy
140
+
## `fileScopedDeclarationPrivacy`
141
+
**type:** object
142
+
143
+
**description:** Declarations at file scope with effective private access should be consistently declared as either `fileprivate` or `private`, determined by configuration.
144
+
145
+
-`accessLevel`_(string)_: The formal access level to use when encountering a file-scoped declaration with effective private access. Allowed values are `private` and `fileprivate`.
146
+
147
+
**default:**`{ "accessLevel" : "private" }`
141
148
142
149
---
143
150
144
-
### FIXME: indentSwitchCaseLabels
151
+
### `indentSwitchCaseLabels`
152
+
**type:** boolean
153
+
154
+
**description:** Determines if `case` statements should be indented compared to the containing `switch` block.
155
+
156
+
When `false`, the correct form is:
157
+
```swift
158
+
switch someValue {
159
+
case someCase:
160
+
someStatement
161
+
...
162
+
}
163
+
```
164
+
When `true`, the correct form is:
165
+
```swift
166
+
switch someValue {
167
+
case someCase:
168
+
someStatement
169
+
...
170
+
}
171
+
```
172
+
173
+
**default:**`false`
145
174
146
175
---
147
176
@@ -154,7 +183,14 @@ top-level keys and values:
154
183
155
184
---
156
185
157
-
### FIXME: noAssignmentInExpressions
186
+
### `noAssignmentInExpressions`
187
+
**type:** object
188
+
189
+
**description:** Assignment expressions must be their own statements. Assignment should not be used in an expression context that expects a `Void` value. For example, assigning a variable within a `return` statement existing a `Void` function is prohibited.
190
+
191
+
-`allowedFunctions`_(strings array)_: A list of function names where assignments are allowed to be embedded in expressions that are passed as parameters to that function.
**description:** Determines how multiline string literals should reflow when formatted.
210
+
211
+
-`never`: Never reflow multiline string literals.
212
+
-`onlyLinesOverLength`: Reflow lines in string literal that exceed the maximum line length.
213
+
For example with a line length of 10:
214
+
```swift
215
+
"""
216
+
an escape\
217
+
line break
218
+
a hard line break
219
+
"""
220
+
```
221
+
will be formatted as:
222
+
```swift
223
+
"""
224
+
an esacpe\
225
+
line break
226
+
a hard \
227
+
line break
228
+
"""
229
+
```
230
+
-`always`: Always reflow multiline string literals, this will ignore existing escaped newlines in the literal and reflow each line. Hard linebreaks are still respected.
0 commit comments