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
swift-format indicates that the following code should have the space between the argument label and the value removed in the property wrapper constructor:
$ swift format lint
@propertyWrapper
struct Wrapper<Value> {
var wrappedValue: Value
enum Configuration {
case first
case second
}
let configuration: Configuration
}
struct Struct {
@Wrapper(configuration: .first)
var data: String = "data"
}
let test = Struct()
^D
<stdin>:14:26: warning: [Spacing]: remove 1 space
Applying the recommended formatting results in the following, which breaks from all other recommendations about spacing in argument labels:
@propertyWrapper
struct Wrapper<Value> {
var wrappedValue: Value
enum Configuration {
case first
case second
}
let configuration: Configuration
}
struct Struct {
@Wrapper(configuration:.first)
var data: String = "data"
}
let test = Struct()
The text was updated successfully, but these errors were encountered:
This is my bad; I was using the homebrew-provided version of swift-format, which was out of date. I've submitted a pull request to make sure others also don't run into the same issue I did.
Additional Detail from JIRA
md5: 79158f393666f0e36ef55daa255abd3d
Issue Description:
swift-format
indicates that the following code should have the space between the argument label and the value removed in the property wrapper constructor:Applying the recommended formatting results in the following, which breaks from all other recommendations about spacing in argument labels:
The text was updated successfully, but these errors were encountered: