RegexConfiguration
public struct RegexConfiguration<Parent: Rule>: SeverityBasedRuleConfiguration, Hashable,
CacheDescriptionProvider, InlinableOptionType
A rule configuration used for defining custom rules in yaml.
-
The execution mode for this custom rule.
See moreDeclaration
Swift
public enum ExecutionMode : String, Codable, Sendable -
The identifier for this custom rule.
Declaration
Swift
public let identifier: String -
The name for this custom rule.
Declaration
Swift
public var name: String? -
The message to be presented when producing violations.
Declaration
Swift
public var message: String -
Regular expressions to include when matching the file path.
Declaration
Swift
public var included: [RegularExpression] -
Regular expressions to exclude when matching the file path.
Declaration
Swift
public var excluded: [RegularExpression] -
The syntax kinds to exclude from matches. If the regex matched syntax kinds from this list, it would be ignored and not count as a rule violation.
Declaration
Swift
public var excludedMatchKinds: Set<SyntaxKind> -
Declaration
Swift
@ConfigurationElement public var severityConfiguration: SeverityConfiguration<Parent> { get set } -
The index of the regex capture group to match.
Declaration
Swift
public var captureGroup: Int -
The execution mode for this rule.
Declaration
Swift
public var executionMode: ExecutionMode -
Declaration
Swift
public var cacheDescription: String { get } -
The
RuleDescriptionfor the custom rule defined here.Declaration
Swift
public var description: RuleDescription { get } -
Create a
RegexConfigurationwith the specified identifier, with other properties to be set later.Declaration
Swift
public init(identifier: String)Parameters
identifierThe rule identifier to use.
-
Declaration
Swift
public mutating func apply(configuration: Any) throws(Issue) -
Declaration
Swift
public func hash(into hasher: inout Hasher)
View on GitHub
Install in Dash