In this PR we create a rule that allows prototool to be invoked by a Bazel run command. Much of the inspiration came from buildifier.
Although we can currently invoke prototool using the provided binary, it requires all arguments to be absolute:
> bazel run @com_uber_prototool//cmd/prototool -- lint $PWD/protobuf/grpc/health/v1/health.proto
../../../../../../../../../../../../../../../../../Users/appleseed/protobuf/grpc/health/v1/health.proto:26:1:Expected "healthv1" for option "go_package" but was "google.golang.org/grpc/health/grpc_health_v1".
As you can see, the output isn't that elegant either. Compare that to the new rule:
> bazel run //:prototool -- lint protobuf/grpc/health/v1/health.proto
protobuf/grpc/health/v1/health.proto:26:1:Expected "healthv1" for option "go_package" but was "google.golang.org/grpc/health/grpc_health_v1".
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
Jathu Satkunarajah seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it.
In this PR we create a rule that allows prototool to be invoked by a Bazel run command. Much of the inspiration came from buildifier.
Although we can currently invoke prototool using the provided binary, it requires all arguments to be absolute:
As you can see, the output isn't that elegant either. Compare that to the new rule: