SwiftLint icon indicating copy to clipboard operation
SwiftLint copied to clipboard

Extraneous whitespace between attribute name and '(';

Open ConfusedVorlon opened this issue 1 year ago • 1 comments
trafficstars

New Issue Checklist

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

  1. 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

  2. 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

  1. Should the rule be configurable, if so what parameters should be configurable? no

  2. Should the rule be opt-in or enabled by default? Why? default - because if swiftlint doesn't handle it, Xcode will

ConfusedVorlon avatar Jul 12 '24 12:07 ConfusedVorlon

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.

SimplyDanny avatar Jul 12 '24 20:07 SimplyDanny