Protocols
The following protocols are available globally.
-
A type that can be converted into a human-readable representation.
See moreDeclaration
Swift
public protocol Documentable
-
Type of an object that can be used as a configuration element.
See moreDeclaration
Swift
public protocol AcceptableByConfigurationElement
-
An option type that can appear inlined into its using configuration.
The
ConfigurationElement
must opt into this behavior. In this case, the option does not have a key. This is almost exclusively useful for commonRuleConfiguration
s that are used in many other rules as child configurations.Warning
A type conforming to this protocol is assumed to throw an issue in its
apply
method only when it’s absolutely clear that there is an error in the YAML configuration passed in. Since it may be used in a nested context and doesn’t know about the outer configuration, it’s not always clear if a certain key-value is really unacceptable.Declaration
Swift
public protocol InlinableOptionType : AcceptableByConfigurationElement
-
A comparable
See moremajor.minor.patch
version number.Declaration
Swift
public protocol VersionComparable : Comparable
-
Interface providing access to a cache description.
See moreDeclaration
Swift
public protocol CacheDescriptionProvider
-
Type-erased protocol used to check whether a rule is collectable.
Declaration
Swift
public protocol AnyCollectingRule : Rule
-
A rule that requires knowledge of all other files being linted.
See moreDeclaration
Swift
public protocol CollectingRule : AnyCollectingRule
-
An interface for reporting violations as strings.
See moreDeclaration
Swift
public protocol Reporter : CustomStringConvertible
-
An executable value that can identify issues (violations) in Swift source code.
See moreDeclaration
Swift
public protocol Rule
-
A rule that is not enabled by default. Rules conforming to this need to be explicitly enabled by users.
Declaration
Swift
public protocol OptInRule : Rule
-
A correctable rule that can apply its corrections by replacing the content of ranges in the offending file with updated content.
See moreDeclaration
Swift
public protocol SubstitutionCorrectableRule : CorrectableRule
-
A rule that does not need SourceKit to operate and can still operate even after SourceKit has crashed.
Declaration
Swift
public protocol SourceKitFreeRule : Rule
-
A configuration value for a rule to allow users to modify its behavior.
See moreDeclaration
Swift
public protocol RuleConfiguration : Equatable
-
A configuration for a rule that allows to configure at least the severity.
See moreDeclaration
Swift
public protocol SeverityBasedRuleConfiguration : RuleConfiguration
-
A SwiftLint CorrectableRule that performs its corrections using a SwiftSyntax
See moreSyntaxRewriter
.Declaration
Swift
public protocol SwiftSyntaxCorrectableRule : CorrectableRule, SwiftSyntaxRule
-
A SwiftLint Rule backed by SwiftSyntax that does not use SourceKit requests.
See moreDeclaration
Swift
public protocol SwiftSyntaxRule : SourceKitFreeRule