mirror of
https://github.com/realm/SwiftLint.git
synced 2026-06-06 20:18:40 +00:00
0e862ca9c4
and fix violations
38 lines
950 B
Swift
38 lines
950 B
Swift
import SourceKittenFramework
|
|
|
|
extension SwiftDeclarationKind {
|
|
internal static let variableKinds: Set<SwiftDeclarationKind> = [
|
|
.varClass,
|
|
.varGlobal,
|
|
.varInstance,
|
|
.varLocal,
|
|
.varParameter,
|
|
.varStatic
|
|
]
|
|
|
|
internal static let functionKinds: Set<SwiftDeclarationKind> = [
|
|
.functionAccessorAddress,
|
|
.functionAccessorDidset,
|
|
.functionAccessorGetter,
|
|
.functionAccessorMutableaddress,
|
|
.functionAccessorSetter,
|
|
.functionAccessorWillset,
|
|
.functionConstructor,
|
|
.functionDestructor,
|
|
.functionFree,
|
|
.functionMethodClass,
|
|
.functionMethodInstance,
|
|
.functionMethodStatic,
|
|
.functionOperator,
|
|
.functionSubscript
|
|
]
|
|
|
|
internal static let typeKinds: Set<SwiftDeclarationKind> = [
|
|
.`class`,
|
|
.`struct`,
|
|
.`typealias`,
|
|
.`associatedtype`,
|
|
.`enum`
|
|
]
|
|
}
|