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
Our current line length limit is 100, which makes creating functions that receives [String: SourceKitRepresentable] as parameter hard, since it's a long (33-char) type.
I'd say we could definitely increase of the default even to 120. A quick GitHub search of SwiftLint configurations appears to show that this is a very common value. People have been suggesting this for a very long time and I think we better get with the times. See #28
I agree with the proposal to extend the default line length limit to 120 characters. I've noticed, though, that the lines that most often exceeded the previous limit of 100 and which were the ugliest to try to wrap were lines containing function declarations (as in the example above). Would it be possible to not apply the line length rule on function declaration lines, and trust that function_parameter_count and other rules will keep the function declarations to a reasonable length?
Edit: I realize now that the original issue here was asking what to do about line length in SwiftLint's own source, and my proposal relates to line length as enforced by SwiftLint's rules. I'm happy to file this proposal as a separate issue, if that's preferable.
Our current line length limit is 100, which makes creating functions that receives
[String: SourceKitRepresentable]
as parameter hard, since it's a long (33-char) type.For example, how should one format this method?
I find myself using worse choices of name method names or weird formatting because of this limit. I propose we should either (or both 😛):
typealias SouceKitDictionary = [String: SourceKitRepresentable]
to save 11 characters.Thoughts?
The text was updated successfully, but these errors were encountered: