specifiers rule forces a wrong order of specifiers. According to the docs the rule should work like this:
- public override final func foo()
+ final override public func foo()
But observed result is this:
final public override func foo()
SwiftFormat version 0.39.0
@schwarja thanks for reporting. I think it's the docs that are wrong in this case, so I'll update them.
@schwarja I've corrected the docs for 0.39.2. Thanks!
@nicklockwood The problem is still there, it is not a doc problem.
override should be in front. See in swift doc override internal func someMethod() {}
https://docs.swift.org/swift-book/LanguageGuide/AccessControl.html
SwiftFormat version 0.40.10
@nicklockwood I agree with @mbentin, it's also the default in swiftlint.
Could you change it or at least make the rule configurable?
We've also run into this issue with SwiftLint vs SwiftFormat. I agree with weakfl that this should probably be configurable. @a2 do we have any bandwidth to open a PR with this? Would be nice to have both be able to run independently without messing up the other.
Sorry, I missed the follow-up comments since they were in a closed issue. I'm happy to change the order to match SwiftLint.
Fixed in 0.44.8
Most helpful comment
Fixed in 0.44.8