Files
Danny Mösch 246643fe55 Keep only command-line related functions in swiftlint module (#5806)
Swift 6 doesn't allow importing executable targets. So we need to
move testable logic into a framework.
2024-09-29 17:23:46 +02:00

15 lines
448 B
Swift

@_exported import SwiftLintBuiltInRules
@_exported import SwiftLintCore
import SwiftLintExtraRules
private let _registerAllRulesOnceImpl: Void = {
RuleRegistry.shared.register(rules: builtInRules + coreRules + extraRules())
}()
package extension RuleRegistry {
/// Register all rules. Should only be called once before any SwiftLint code is executed.
static func registerAllRulesOnce() {
_ = _registerAllRulesOnceImpl
}
}