nicklockwood / SwiftFormat

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

RegEx #1558

Closed pdshelley closed 7 months ago

pdshelley commented 8 months ago

the following line of code has the error of spaceAroundParens

let result = inputText.matches(of: /\s(\w+)$/)

I believe this is an error, as this is valid syntax with RegexBuilder introduced in Swift 5.7.

nicklockwood commented 8 months ago

I'm not seeing any errors with this line of code. Can you share your .swiftformat config. Does the error definitely present for a file with just that line of code in it? Maybe it depends on some surrounding context?