Command
public struct Command : Equatable
A SwiftLint-interpretable command to modify SwiftLint’s behavior embedded as comments in source code.
-
The action (verb) that SwiftLint should perform when interpreting this command.
See moreDeclaration
Swift
public enum Action : String -
The modifier for a command, used to modify its scope.
See moreDeclaration
Swift
public enum Modifier : String -
The action (verb) that SwiftLint should perform when interpreting this command.
Declaration
Swift
public let action: Action -
The identifiers for the rules associated with this command.
Declaration
Swift
public let ruleIdentifiers: Set<RuleIdentifier> -
The line in the source file where this command is defined.
Declaration
Swift
public let line: Int -
The character offset within the line in the source file where this command is defined.
Declaration
Swift
public let character: Int? -
This command’s modifier, if any.
Declaration
Swift
public let modifier: Modifier? -
Creates a command based on the specified parameters.
Declaration
Swift
public init(action: Action, ruleIdentifiers: Set<RuleIdentifier> = [], line: Int = 0, character: Int? = nil, modifier: Modifier? = nil, trailingComment: String? = nil)Parameters
actionThis command’s action.
ruleIdentifiersThe identifiers for the rules associated with this command.
lineThe line in the source file where this command is defined.
characterThe character offset within the line in the source file where this command is defined.
modifierThis command’s modifier, if any.
trailingCommentThe comment following this command’s
-delimiter, if any. -
Creates a command based on the specified parameters.
Declaration
Swift
public init(actionString: String, line: Int, character: Int)Parameters
actionStringThe string in the command’s definition describing its action.
lineThe line in the source file where this command is defined.
characterThe character offset within the line in the source file where this command is defined.
View on GitHub
Install in Dash
Command Structure Reference