mirror of
https://github.com/realm/SwiftLint.git
synced 2026-05-07 20:12:49 +00:00
19 lines
904 B
Swift
19 lines
904 B
Swift
import SwiftLintCore
|
|
|
|
@AutoConfigParser
|
|
struct IdentifierNameConfiguration: RuleConfiguration {
|
|
typealias Parent = IdentifierNameRule
|
|
|
|
private static let defaultOperators = ["/", "=", "-", "+", "!", "*", "|", "^", "~", "?", ".", "%", "<", ">", "&"]
|
|
|
|
@ConfigurationElement(inline: true)
|
|
private(set) var nameConfiguration = NameConfiguration<Parent>(minLengthWarning: 3,
|
|
minLengthError: 2,
|
|
maxLengthWarning: 40,
|
|
maxLengthError: 60,
|
|
excluded: ["id"])
|
|
|
|
@ConfigurationElement(key: "additional_operators", postprocessor: { $0.formUnion(Self.defaultOperators) })
|
|
private(set) var additionalOperators = Set<String>()
|
|
}
|