nicklockwood / SwiftFormat

A command-line tool and Xcode Extension for formatting Swift code
MIT License
7.67k stars 623 forks source link

Generic Type Name Violation To Swift 5.9 new feature #1555

Closed MrYu4 closed 8 months ago

MrYu4 commented 8 months ago

Swift 5.9 has new feature called:Parameter Packs SE-0399

Now I try to write this code In Swift 5.9:

func tuplify<each T>(_ value: repeat each T) -> (repeat each T) {
  return (repeat each value)
}

but I was told that this error happened by swiftFormat:

Generic Type Name Violation: Generic type name should start with an uppercase character: 'each' (generic_type_name)

So how could I do?

nicklockwood commented 8 months ago

@MrYu4 are you sure that error is from SwiftFormat? It looks more like SwiftLint output to me.