You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
@ahoppen so that duplicate might by why the suppression doesn't work, but the error here is also pretty odd. The variable does not end in "Message" as the message suggests. I have a feeling there is also something else wrong in the check.
Checkout https://github.com/apple/swift-protobuf @ c9fbc332ed293c64ff70af8d82367ca530dce11c
swift format lint Sources/SwiftProtobuf/Message.swift
- Will produce a warning:Apply this diff:
swift format lint Sources/SwiftProtobuf/Message.swift
- will still produce the warning (just with the line number increased correctly)Likely issues:
The text was updated successfully, but these errors were encountered: