mirror of
https://github.com/realm/SwiftLint.git
synced 2026-05-07 20:12:49 +00:00
246643fe55
Swift 6 doesn't allow importing executable targets. So we need to move testable logic into a framework.
15 lines
448 B
Swift
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
|
|
}
|
|
}
|