mirror of
https://github.com/realm/SwiftLint.git
synced 2026-06-06 20:18:40 +00:00
24 lines
511 B
Swift
24 lines
511 B
Swift
import SwiftCompilerPlugin
|
|
import SwiftDiagnostics
|
|
import SwiftSyntax
|
|
import SwiftSyntaxMacros
|
|
|
|
@main
|
|
struct SwiftLintCoreMacros: CompilerPlugin {
|
|
let providingMacros: [any Macro.Type] = [
|
|
AutoConfigParser.self,
|
|
AcceptableByConfigurationElement.self,
|
|
DisabledWithoutSourceKit.self,
|
|
SwiftSyntaxRule.self,
|
|
TemporaryDirectory.self,
|
|
WorkingDirectory.self,
|
|
]
|
|
}
|
|
|
|
#if os(Windows)
|
|
@_cdecl("main")
|
|
public func main() {
|
|
try! SwiftLintCoreMacros.main()
|
|
}
|
|
#endif
|