From 90d1753934c9f48bb21e4362cebedcdc222aa9da Mon Sep 17 00:00:00 2001 From: Jonathan Grynspan Date: Wed, 2 Oct 2024 14:31:24 -0400 Subject: [PATCH] Disable formatting for more macros. Follow-on to #743. Disables formatting for `#_sourceLocation` and `@Tag`. Although I haven't seen either in a sample/spindump, every little bit counts and neither of these macros needs the formatting to build correctly. --- Sources/TestingMacros/SourceLocationMacro.swift | 4 ++++ Sources/TestingMacros/TagMacro.swift | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/Sources/TestingMacros/SourceLocationMacro.swift b/Sources/TestingMacros/SourceLocationMacro.swift index 3ba65a38b..240105323 100644 --- a/Sources/TestingMacros/SourceLocationMacro.swift +++ b/Sources/TestingMacros/SourceLocationMacro.swift @@ -22,4 +22,8 @@ public struct SourceLocationMacro: ExpressionMacro, Sendable { ) throws -> ExprSyntax { createSourceLocationExpr(of: macro, context: context) } + + public static var formatMode: FormatMode { + .disabled + } } diff --git a/Sources/TestingMacros/TagMacro.swift b/Sources/TestingMacros/TagMacro.swift index 921cdad54..b94149c09 100644 --- a/Sources/TestingMacros/TagMacro.swift +++ b/Sources/TestingMacros/TagMacro.swift @@ -102,4 +102,8 @@ public struct TagMacro: PeerMacro, AccessorMacro, Sendable { } return [] } + + public static var formatMode: FormatMode { + .disabled + } }