Structures
The following structures are available globally.
-
User-facing documentation for a SwiftLint RuleList.
See moreDeclaration
Swift
public struct RuleListDocumentation
-
A basic stack type implementing the LIFO principle - only the last inserted element can be accessed and removed.
See moreDeclaration
Swift
public struct Stack<Element>
extension Stack: CustomDebugStringConvertible where Element == CustomDebugStringConvertible
-
A rule configuration that allows to disable (
See moreoff
) an option of a rule or specify its severity level in which case it’s active.Declaration
Swift
public struct ChildOptionSeverityConfiguration<Parent> : RuleConfiguration, Equatable, InlinableOptionType where Parent : Rule
-
A SwiftLint-interpretable command to modify SwiftLint’s behavior embedded as comments in source code.
See moreDeclaration
Swift
public struct Command : Equatable
-
The configuration struct for SwiftLint. User-defined in the
See more.swiftlint.yml
file, drives the behavior of SwiftLint.Declaration
Swift
public struct Configuration
extension Configuration: Hashable
extension Configuration: CustomStringConvertible
-
A value describing a SwiftLint violation that was corrected.
See moreDeclaration
Swift
public struct Correction : Equatable
-
Captures code and context information for an example of a triggering or non-triggering style
See moreDeclaration
Swift
public struct Example
extension Example: Hashable
extension Example: Comparable
-
Represents a file that can be linted for style violations and corrections after being collected.
See moreDeclaration
Swift
public struct Linter
-
Represents a file that can compute style violations and corrections for a list of rules.
A
See moreCollectedLinter
is only created after aLinter
has run its collection steps inLinter.collect(into:)
.Declaration
Swift
public struct CollectedLinter
-
The placement of a segment of Swift in a collection of source files.
See moreDeclaration
Swift
public struct Location : CustomStringConvertible, Comparable, Codable
-
A contiguous region of Swift source code.
See moreDeclaration
Swift
public struct Region : Equatable
-
Description of a rule configuration.
See moreDeclaration
Swift
public struct RuleConfigurationDescription : Equatable
extension RuleConfigurationDescription: Documentable
-
A single option of a
See moreRuleConfigurationDescription
.Declaration
Swift
public struct RuleConfigurationOption : Equatable
extension RuleConfigurationOption: Documentable
-
A result builder creating configuration descriptions.
Declaration
Swift
@resultBuilder public struct RuleConfigurationDescriptionBuilder
-
A single parameter of a rule configuration.
Apply it to a simple (e.g. boolean) property like
@ConfigurationElement(key: "name") var property = true
If the wrapped element is an
InlinableOptionType
, there are two options for its representation in the documentation:- It can be inlined into the parent configuration. For that, do not provide a name as an argument. E.g.
swift @ConfigurationElement(key: "name") var property = true @ConfigurationElement var levels = SeverityLevelsConfiguration(warning: 1, error: 2)
will be documented as a linear list:name: true warning: 1 error: 2
- It can be represented as a separate nested configuration. In this case, it must have a name. E.g.
swift @ConfigurationElement(key: "name") var property = true @ConfigurationElement(key: "levels") var levels = SeverityLevelsConfiguration(warning: 1, error: 2)
will have a nested configuration section:name: true levels: warning: 1 error: 2
Declaration
Swift
@propertyWrapper public struct ConfigurationElement<T> : Equatable where T : Equatable, T : AcceptableByConfigurationElement
- It can be inlined into the parent configuration. For that, do not provide a name as an argument. E.g.
-
A rule configuration that allows specifying the desired severity level for violations.
See moreDeclaration
Swift
public struct SeverityConfiguration<Parent> : SeverityBasedRuleConfiguration, Equatable where Parent : Rule
-
A detailed description for a SwiftLint rule. Used for both documentation and testing purposes.
See moreDeclaration
Swift
public struct RuleDescription : Equatable
-
A list of available SwiftLint rules.
See moreDeclaration
Swift
public struct RuleList
extension RuleList: Equatable
-
A configuration parameter for rules.
See moreDeclaration
Swift
public struct RuleParameter<T> : Equatable where T : Equatable
-
A value describing an instance of Swift source code that is considered invalid by a SwiftLint rule.
See moreDeclaration
Swift
public struct StyleViolation : CustomStringConvertible, Equatable, Codable
-
Represents a Swift file’s syntax information.
See moreDeclaration
Swift
public struct SwiftLintSyntaxMap
-
A SwiftLint-aware Swift syntax token.
See moreDeclaration
Swift
public struct SwiftLintSyntaxToken
-
A value describing the version of the Swift compiler.
See moreDeclaration
Swift
public struct SwiftVersion : RawRepresentable, Codable, Comparable
-
A type describing the SwiftLint version.
See moreDeclaration
Swift
public struct Version
-
An interface for parsing YAML.
See moreDeclaration
Swift
public struct YamlParser
-
A violation produced by
See moreViolationsSyntaxVisitor
s.Declaration
Swift
public struct ReasonedRuleViolation : Comparable, Hashable
-
A rule configuration used for defining custom rules in yaml.
See moreDeclaration
Swift
public struct RegexConfiguration<Parent> : SeverityBasedRuleConfiguration, Hashable, CacheDescriptionProvider where Parent : Rule
-
A rule configuration that allows specifying thresholds for
See morewarning
anderror
severities.Declaration
Swift
public struct SeverityLevelsConfiguration<Parent> : RuleConfiguration, Equatable where Parent : Rule
-
The correction of a violation that is basically the violation’s range in the source code and a replacement for this range that would fix the violation.
See moreDeclaration
Swift
public struct ViolationCorrection