nicklockwood / SwiftFormat

A command-line tool and Xcode Extension for formatting Swift code
MIT License
7.66k stars 623 forks source link

docComments removes macro documentation #1552

Closed finnvoor closed 9 months ago

finnvoor commented 9 months ago

The following top level declaration:

/// Adds a static `logger` member to the type.
/// - Parameters:
///   - subsystem: An optional subsystem for the logger to use. Defaults to `Bundle.main.bundleIdentifier`.
///   - category: An optional category for the logger to use. Defaults to `String(describing: Self.self)`.
@attached(member, names: named(logger)) public macro StaticLogger(
    subsystem: String? = nil,
    category: String? = nil
) = #externalMacro(module: "StaticLoggerMacros", type: "StaticLogger")

gets formatted to: (doc comments converted to regular comments)

// Adds a static `logger` member to the type.
// - Parameters:
//   - subsystem: An optional subsystem for the logger to use. Defaults to `Bundle.main.bundleIdentifier`.
//   - category: An optional category for the logger to use. Defaults to `String(describing: Self.self)`.
@attached(member, names: named(logger)) public macro StaticLogger(
    subsystem: String? = nil,
    category: String? = nil
) = #externalMacro(module: "StaticLoggerMacros", type: "StaticLogger")
nicklockwood commented 9 months ago

@Finnvoor fixed in 0.52.8

finnvoor commented 9 months ago

amazing, thanks 🙏