Files
SwiftLint/Source/SwiftLintBuiltInRules/Rules/RuleConfigurations/IdentifierNameConfiguration.swift
T

19 lines
883 B
Swift

import SwiftLintCore
@AutoApply
struct IdentifierNameConfiguration: RuleConfiguration {
typealias Parent = IdentifierNameRule
private static let defaultOperators = ["/", "=", "-", "+", "!", "*", "|", "^", "~", "?", ".", "%", "<", ">", "&"]
@ConfigurationElement
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>()
}