mirror of
https://github.com/realm/SwiftLint.git
synced 2026-05-07 20:12:49 +00:00
Use enums for macro implementations
This commit is contained in:
@@ -27,7 +27,7 @@ enum RuleConfigurationMacroError: String, DiagnosticMessage {
|
||||
}
|
||||
}
|
||||
|
||||
struct AutoApply: MemberMacro {
|
||||
enum AutoApply: MemberMacro {
|
||||
static func expansion(
|
||||
of node: AttributeSyntax,
|
||||
providingMembersOf declaration: some DeclGroupSyntax,
|
||||
@@ -89,7 +89,7 @@ struct AutoApply: MemberMacro {
|
||||
}
|
||||
}
|
||||
|
||||
struct MakeAcceptableByConfigurationElement: ExtensionMacro {
|
||||
enum MakeAcceptableByConfigurationElement: ExtensionMacro {
|
||||
static func expansion(
|
||||
of node: AttributeSyntax,
|
||||
attachedTo declaration: some DeclGroupSyntax,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import SwiftSyntax
|
||||
import SwiftSyntaxMacros
|
||||
|
||||
struct SwiftSyntaxRule: ExtensionMacro {
|
||||
enum SwiftSyntaxRule: ExtensionMacro {
|
||||
static func expansion(
|
||||
of node: AttributeSyntax,
|
||||
attachedTo declaration: some DeclGroupSyntax,
|
||||
|
||||
Reference in New Issue
Block a user