Skip to content

Lint is inconsistent on how source paths are reported #818

@thomasvl

Description

@thomasvl
  1. Checkout https://github.com/apple/swift-protobuf @ c9fbc332ed293c64ff70af8d82367ca530dce11c
  2. Run
    swift format lint \
        Sources/SwiftProtobuf/Message.swift \
        Tests/SwiftProtobufTests/Test_Extensions.swift

You get:

Sources/SwiftProtobuf/Message.swift:46:16: warning: [DontRepeatTypeInStaticProperties] remove the suffix 'Message' from the name of the variable 'protoMessageName'
/Users/thomasvl/src/github/swift-protobuf/Tests/SwiftProtobufTests/Test_Extensions.swift:97:68: warning: [EndOfLineComment] move end-of-line comment that exceeds the line length

The order of the two arguments doesn't matters, the path to Message.swift is reported as the shortened relative path and Test_Extensions.swift is always reported as a full path instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions