Re-order `CustomRules.swift` (#4944)
For consistency with other files in this project, which usually have private extensions at the bottom of the file.
This commit is contained in:
parent
ea56405983
commit
72c2a5488d
|
@ -1,16 +1,10 @@
|
|||
import Foundation
|
||||
|
||||
private extension Region {
|
||||
func isRuleDisabled(customRuleIdentifier: String) -> Bool {
|
||||
return disabledRuleIdentifiers.contains(RuleIdentifier(customRuleIdentifier))
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - CustomRulesConfiguration
|
||||
|
||||
struct CustomRulesConfiguration: RuleConfiguration, Equatable, CacheDescriptionProvider {
|
||||
var consoleDescription: String { return "user-defined" }
|
||||
internal var cacheDescription: String {
|
||||
var cacheDescription: String {
|
||||
return customRuleConfigurations
|
||||
.sorted { $0.identifier < $1.identifier }
|
||||
.map { $0.cacheDescription }
|
||||
|
@ -41,7 +35,7 @@ struct CustomRulesConfiguration: RuleConfiguration, Equatable, CacheDescriptionP
|
|||
// MARK: - CustomRules
|
||||
|
||||
struct CustomRules: Rule, ConfigurationProviderRule, CacheDescriptionProvider {
|
||||
internal var cacheDescription: String {
|
||||
var cacheDescription: String {
|
||||
return configuration.cacheDescription
|
||||
}
|
||||
|
||||
|
@ -93,3 +87,9 @@ struct CustomRules: Rule, ConfigurationProviderRule, CacheDescriptionProvider {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
private extension Region {
|
||||
func isRuleDisabled(customRuleIdentifier: String) -> Bool {
|
||||
return disabledRuleIdentifiers.contains(RuleIdentifier(customRuleIdentifier))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue