Compare commits
3 Commits
main
...
update-sou
Author | SHA1 | Date |
---|---|---|
![]() |
9a2bbbf8c3 | |
![]() |
fe43d6ecd4 | |
![]() |
cb0d0d919d |
|
@ -1,6 +1,6 @@
|
|||
import SwiftSyntax
|
||||
|
||||
public struct ForceCastRule: ConfigurationProviderRule {
|
||||
public struct ForceCastRule: ConfigurationProviderRule, SourceKitFreeRule {
|
||||
public var configuration = SeverityConfiguration(.error)
|
||||
|
||||
public init() {}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import SourceKittenFramework
|
||||
import SwiftSyntax
|
||||
|
||||
public struct ReturnValueFromVoidFunctionRule: ConfigurationProviderRule, OptInRule {
|
||||
public struct ReturnValueFromVoidFunctionRule: ConfigurationProviderRule, OptInRule, SourceKitFreeRule {
|
||||
public var configuration = SeverityConfiguration(.warning)
|
||||
|
||||
public init() {}
|
||||
|
@ -17,10 +17,10 @@ public struct ReturnValueFromVoidFunctionRule: ConfigurationProviderRule, OptInR
|
|||
)
|
||||
|
||||
public func validate(file: SwiftLintFile) -> [StyleViolation] {
|
||||
let visitor = ReturnValueFromVoidFunctionVisitor()
|
||||
return visitor.walk(file: file) { visitor in
|
||||
visitor.violations(for: self, in: file)
|
||||
}
|
||||
ReturnValueFromVoidFunctionVisitor()
|
||||
.walk(file: file) { visitor in
|
||||
visitor.violations(for: self, in: file)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import Foundation
|
|||
import SourceKittenFramework
|
||||
import SwiftSyntax
|
||||
|
||||
public struct SyntacticSugarRule: CorrectableRule, ConfigurationProviderRule {
|
||||
public struct SyntacticSugarRule: CorrectableRule, ConfigurationProviderRule, SourceKitFreeRule {
|
||||
public var configuration = SeverityConfiguration(.warning)
|
||||
|
||||
public init() {}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import SourceKittenFramework
|
||||
import SwiftSyntax
|
||||
|
||||
public struct UnavailableConditionRule: ConfigurationProviderRule {
|
||||
public struct UnavailableConditionRule: ConfigurationProviderRule, SourceKitFreeRule {
|
||||
public var configuration = SeverityConfiguration(.warning)
|
||||
|
||||
public init() {}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import SwiftSyntax
|
||||
|
||||
public struct VoidFunctionInTernaryConditionRule: ConfigurationProviderRule {
|
||||
public struct VoidFunctionInTernaryConditionRule: ConfigurationProviderRule, SourceKitFreeRule {
|
||||
public var configuration = SeverityConfiguration(.warning)
|
||||
|
||||
public init() {}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
public struct SuperfluousDisableCommandRule: ConfigurationProviderRule {
|
||||
public struct SuperfluousDisableCommandRule: ConfigurationProviderRule, SourceKitFreeRule {
|
||||
public var configuration = SeverityConfiguration(.warning)
|
||||
|
||||
public init() {}
|
||||
|
@ -21,8 +21,9 @@ public struct SuperfluousDisableCommandRule: ConfigurationProviderRule {
|
|||
}
|
||||
|
||||
public func reason(for rule: String) -> String {
|
||||
return "SwiftLint rule '\(rule)' did not trigger a violation " +
|
||||
"in the disabled region. Please remove the disable command."
|
||||
"""
|
||||
SwiftLint rule '\(rule)' did not trigger a violation in the disabled region. Please remove the disable command.
|
||||
"""
|
||||
}
|
||||
|
||||
public func reason(forNonExistentRule rule: String) -> String {
|
||||
|
|
|
@ -2,7 +2,8 @@ import Foundation
|
|||
import SourceKittenFramework
|
||||
import SwiftSyntax
|
||||
|
||||
public struct CommaInheritanceRule: OptInRule, SubstitutionCorrectableRule, ConfigurationProviderRule {
|
||||
public struct CommaInheritanceRule: OptInRule, SubstitutionCorrectableRule, ConfigurationProviderRule,
|
||||
SourceKitFreeRule {
|
||||
public var configuration = SeverityConfiguration(.warning)
|
||||
|
||||
public init() {}
|
||||
|
|
|
@ -2,7 +2,7 @@ import Foundation
|
|||
import SourceKittenFramework
|
||||
import SwiftSyntax
|
||||
|
||||
public struct OperatorUsageWhitespaceRule: OptInRule, CorrectableRule, ConfigurationProviderRule {
|
||||
public struct OperatorUsageWhitespaceRule: OptInRule, CorrectableRule, ConfigurationProviderRule, SourceKitFreeRule {
|
||||
public var configuration = OperatorUsageWhitespaceConfiguration()
|
||||
|
||||
public init() {}
|
||||
|
|
Loading…
Reference in New Issue