File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -163,7 +163,27 @@ public struct Configuration: Codable, Equatable {
163
163
/// Contains exceptions for the `NoAssignmentInExpressions` rule.
164
164
public var noAssignmentInExpressions : NoAssignmentInExpressionsConfiguration
165
165
166
- /// Determines whether multi-element collection literals should have trailing commas.
166
+ /// Determines if multi-element collection literals should have trailing commas.
167
+ ///
168
+ /// When `true` (default), the correct form is:
169
+ /// ```swift
170
+ /// let MyCollection = [1, 2,]
171
+ /// ...
172
+ /// let MyCollection = [
173
+ /// "a": 1,
174
+ /// "b": 2,
175
+ /// ]
176
+ /// ```
177
+ ///
178
+ /// When `false`, the correct form is:
179
+ /// ```swift
180
+ /// let MyCollection = [1, 2]
181
+ /// ...
182
+ /// let MyCollection = [
183
+ /// "a": 1,
184
+ /// "b": 2
185
+ /// ]
186
+ /// ```
167
187
public var multiElementCollectionTrailingCommas : Bool
168
188
169
189
/// Constructs a Configuration by loading it from a configuration file.
You can’t perform that action at this time.
0 commit comments