nicklockwood / SwiftFormat

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

--anonymousforeach ignore is not working #1612

Closed Mehdi-Sohrabi0 closed 5 months ago

Mehdi-Sohrabi0 commented 5 months ago

Hi,

I want to ignore the new rule for converting forEach loop to for loop, so I added --anonymousforeach ignore to my .swiftformat file (also tried with --anonymousforeach preserve), but still when I'm running swiftformat . it will convert my forEach loop to for loop.

Any help or suggestion would be appreciated.

Best

nicklockwood commented 5 months ago

Add --disable preferForLoop to your config

Mehdi-Sohrabi0 commented 5 months ago

Add --disable preferForLoop to your config

Thanks a lot, solved the problem.