Files
SwiftLint/Source/SwiftLintFramework/Models/HashableConfigurationRuleWrapperWrapper.swift
Danny Mösch a6c4fd98bc Move files from SwiftLintCore to SwiftLintFramework
Ideally, SwiftLintCore would some day only contain components
that are needed to define rules. Consequently, it would be the
only bundle required to import for (external) rule development.
2024-12-23 12:51:43 +01:00

16 lines
543 B
Swift

internal struct HashableConfigurationRuleWrapperWrapper: Hashable {
let configurationRuleWrapper: ConfigurationRuleWrapper
static func == (
lhs: Self, rhs: Self
) -> Bool {
// Only use identifier for equality check (not taking config into account)
type(of: lhs.configurationRuleWrapper.rule).identifier
== type(of: rhs.configurationRuleWrapper.rule).identifier
}
func hash(into hasher: inout Hasher) {
hasher.combine(type(of: configurationRuleWrapper.rule).identifier)
}
}