mirror of
https://github.com/realm/SwiftLint.git
synced 2026-05-07 20:12:49 +00:00
6998d8af23
* Migrate `shorthand_operator` rule to SwiftSyntax * Remove unneeded imports
11 lines
235 B
Swift
11 lines
235 B
Swift
import SwiftOperators
|
|
import SwiftSyntax
|
|
|
|
extension SourceFileSyntax {
|
|
func folded() -> SourceFileSyntax? {
|
|
OperatorTable.standardOperators
|
|
.foldAll(self) { _ in }
|
|
.as(SourceFileSyntax.self)
|
|
}
|
|
}
|