googleapis / googleapis/api-linter

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

Open
#1,533 0 comments 0 reactions 0 assignees View on GitHub
priority: p2 type: bug
Dominant language
Go
Stars
765
Forks
181
Avg merge
2d 12h
Merged PRs (30d)
3

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.