SwiftLint
SwiftLint copied to clipboard
Extraneous whitespace between attribute name and '(';
New Issue Checklist
- [ Y] Updated SwiftLint to the latest version
- [ Y] I searched for existing GitHub issues
New rule request
the following code
private (set) var type: ClipType = .undetermined
generates a warning in Xcode 16 beta 3
warning: extraneous whitespace between attribute name and '('; this is an error in the Swift 6 language mode
-
Why should this rule be added? Share links to existing discussion about what the community thinks about this. I assume swiftlint could detect and fix this before Xcode needs to worry about it
-
Provide several examples of what would and wouldn't trigger violations.
triggers:
private (set) var type: ClipType = .undetermined
doesn't trigger
private(set) var type: ClipType = .undetermined
-
Should the rule be configurable, if so what parameters should be configurable? no
-
Should the rule be opt-in or enabled by default? Why? default - because if swiftlint doesn't handle it, Xcode will
This should be a pretty simple rule to implement. However, it's probably also not a big deal to fix this only as soon as the Swift 6 compiler complains.