Structures

The following structures are available globally.

Result builder

Property wrapper

  • 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:

    1. 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
    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
    See more

    Declaration

    Swift

    @propertyWrapper
    public struct ConfigurationElement<T> : Equatable where T : Equatable, T : AcceptableByConfigurationElement
  • A rule configuration that allows specifying the desired severity level for violations.

    See more

    Declaration

    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 more

    Declaration

    Swift

    public struct RuleDescription : Equatable
  • A list of available SwiftLint rules.

    See more

    Declaration

    Swift

    public struct RuleList
    extension RuleList: Equatable
  • A configuration parameter for rules.

    See more

    Declaration

    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 more

    Declaration

    Swift

    public struct StyleViolation : CustomStringConvertible, Equatable, Codable
  • Represents a Swift file’s syntax information.

    See more

    Declaration

    Swift

    public struct SwiftLintSyntaxMap
  • A SwiftLint-aware Swift syntax token.

    See more

    Declaration

    Swift

    public struct SwiftLintSyntaxToken
  • A value describing the version of the Swift compiler.

    See more

    Declaration

    Swift

    public struct SwiftVersion : RawRepresentable, Codable, Comparable
  • A type describing the SwiftLint version.

    See more

    Declaration

    Swift

    public struct Version

YamlParser