Open sallustfire opened 4 months ago
@alexeagle Here's what I see, and I saw the same problem with rules_proto_grpc
and their buf lint integration in the past. That makes me thing it's a general problem with the protoc plugin, but I don't know how to square that with the smoke test you performed the other day.
To your earlier point, I do think switching to call buf lint
instead of protoc --plugin=some-buf-thing
is likely more correct and easier to reproduce or get help from the Buf team. Worth investigation.
What happened?
The reported line numbers from running the buf_lint_aspect are always
<souce_path>:1:1<messaage>
, which adds friction to resolving lint errors especially when the source file is large.Version
Development (host) and target OS/architectures:
Output of
bazel --version
: 7.1.1Version of the Aspect rules, or other relevant rules from your
WORKSPACE
orMODULE.bazel
file: HEADHow to reproduce
This can be reproduced with the file.proto source in example/
Via aspect:
Via buf cli
As a sanity check aspect lint produces the same output:
Any other information?
I haven't more than glanced at the source code, but I believe this is a problem with the protoc plugin protoc-gen-but-lint and not rules_lint. The buf cli is a go program that lints the sources directly and not as a protoc plugin. It may be the case that using the protoc plugin also introduces subtle differences in the DX if IDE plugins are integrating with the buf cli directly.