swiftlang / swift-format

Formatting technology for Swift source code
Apache License 2.0
2.49k stars 229 forks source link

DontRepeatTypeInStaticProperties message doesn't match what it detect #854

Open thomasvl opened 1 week ago

thomasvl commented 1 week ago
  1. Checkout https://github.com/apple/swift-protobuf @ c9fbc332ed293c64ff70af8d82367ca530dce11c
  2. 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'

The error message says to remove the suffix 'Message', but the variable isn't a suffixed with 'Message'. The check must be doing an contains on the name. Not sure if the impl or the error message is wrong.

ahoppen commented 1 week ago

Synced to Apple’s issue tracker as rdar://137894442