mirror of
https://github.com/realm/SwiftLint.git
synced 2026-06-06 20:18:40 +00:00
18ad2473d0
These were once required but now that we only support Swift 4.2 or later, they're unnecessary.
38 lines
940 B
Swift
38 lines
940 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
|
|
]
|
|
}
|