-
correct(file:Default implementationcompilerArguments: ) Attempts to correct the violations to this rule in the specified file.
Default Implementation
Declaration
Swift
func correct(file: SwiftLintFile, compilerArguments: [String]) -> IntParameters
fileThe file for which to correct violations.
compilerArgumentsThe compiler arguments needed to compile this file.
Return Value
Number of corrections that were applied.
-
Attempts to correct the violations to this rule in the specified file.
Declaration
Swift
func correct(file: SwiftLintFile) -> IntParameters
fileThe file for which to correct violations.
Return Value
Number of corrections that were applied.
-
correct(file:Default implementationusing: compilerArguments: ) Attempts to correct the violations to this rule in the specified file after collecting file info for all files and returns all corrections that were applied.
Note
This function is called by the linter and is always implemented in extensions.
Default Implementation
Declaration
Swift
func correct(file: SwiftLintFile, using storage: RuleStorage, compilerArguments: [String]) -> IntParameters
fileThe file for which to execute the rule.
storageThe storage object containing all collected info.
compilerArgumentsThe compiler arguments needed to compile this file.
Return Value
All corrections that were applied.
View on GitHub
Install in Dash