-
Notifications
You must be signed in to change notification settings - Fork 256
Closed
Description
-
Checkout https://github.com/apple/swift-protobuf @ c9fbc332ed293c64ff70af8d82367ca530dce11c
-
swift format lint Sources/SwiftProtobuf/Message.swift- Will produce a warning:Sources/SwiftProtobuf/Message.swift:46:16: warning: [DontRepeatTypeInStaticProperties] remove the suffix 'Message' from the name of the variable 'protoMessageName'
-
Apply this diff:
diff --git a/Sources/SwiftProtobuf/Message.swift b/Sources/SwiftProtobuf/Message.swift index 4d59ab93..8ebbb1e5 100644 --- a/Sources/SwiftProtobuf/Message.swift +++ b/Sources/SwiftProtobuf/Message.swift @@ -43,6 +43,7 @@ public protocol Message: Sendable, CustomDebugStringConvertible { /// The fully-scoped name of the message from the original .proto file, /// including any relevant package name. + // swift-format-ignore: DontRepeatTypeInStaticProperties static var protoMessageName: String { get } /// True if all required fields (if any) on this message and any nested
-
swift format lint Sources/SwiftProtobuf/Message.swift- will still produce the warning (just with the line number increased correctly)Sources/SwiftProtobuf/Message.swift:47:16: warning: [DontRepeatTypeInStaticProperties] remove the suffix 'Message' from the name of the variable 'protoMessageName'
Likely issues:
- I'm not sure the warning is correct since "Message" isn't the suffix, it's actually Name or MessageName
- The comment to suppress doesn't suppress.
Metadata
Metadata
Assignees
Labels
No labels