Skip to content

Github format outputs incorrect file names when use together with --proto-path #1533

@SoMuchForSubtlety

Description

@SoMuchForSubtlety

Output filepaths are missing their proto-path "prefix". This affects all outputs, but I would only call it strictly incorrect for the github format.

When calling api-linter with the following folder structure

└── proto
    ├── package
    │   └── v1
    │       └── some_file.proto
    └── other_package
        └── nested
            └── v1
                └── other_file.proto

and the argument --proto-path proto, then errors for ./proto/package/v1/some_file.proto will be reported for the file package/v1/some_file.proto.

This results in the github annotation ::error file=package/v1/some_file.proto,endLine=x,col=y,line=z,title=...... This annotation points to a location that does not exist.

Steps to reproduce

  1. use github format and proto-path

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions