Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run envoy code formatter on proto files #917

Open
dubious90 opened this issue Sep 21, 2022 · 0 comments
Open

Run envoy code formatter on proto files #917

dubious90 opened this issue Sep 21, 2022 · 0 comments
Labels
enhancement New feature or request tech-debt

Comments

@dubious90
Copy link
Contributor

When we run fix_format script, there is currently a warning that appears:

Please note: `tools/code_format/check_format.py` no longer checks API `.proto` files, please use `tools/proto_format/proto_format.sh` if you are making changes to the API files

We should probably also run this as part of our formatting. However, I believe it requires an upstream change to allow us to access it in bazel. When I tried to run it manually, got:

nbperry@nbperry:~/git/nbperry-nighthawk$ bazel run @envoy//tools/proto_format:proto_format.sh
WARNING: The following configs were expanded more than once: [rbe-toolchain-clang-libc++, rbe-toolchain]. For repeatable flags, repeats are counted twice and may lead to unexpected behavior.
INFO: Invocation ID: 26035fbf-f9f6-47c0-806b-e611de42ac32
ERROR: Skipping '@envoy//tools/proto_format:proto_format.sh': no such target '@envoy//tools/proto_format:proto_format.sh': target 'proto_format.sh' not declared in package 'tools/proto_format'; however, a source file of this name exists.  (Perhaps add 'exports_files(["proto_format.sh"])' to tools/proto_format/BUILD?) defined by /usr/local/google/home/nbperry/.cache/bazel/_bazel_nbperry/2b135b66df44e56e2b3c6661f277b0d6/external/envoy/tools/proto_format/BUILD
WARNING: Target pattern parsing failed.
ERROR: no such target '@envoy//tools/proto_format:proto_format.sh': target 'proto_format.sh' not declared in package 'tools/proto_format'; however, a source file of this name exists.  (Perhaps add 'exports_files(["proto_format.sh"])' to tools/proto_format/BUILD?) defined by /usr/local/google/home/nbperry/.cache/bazel/_bazel_nbperry/2b135b66df44e56e2b3c6661f277b0d6/external/envoy/tools/proto_format/BUILD
INFO: Elapsed time: 0.602s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (1 packages loaded)
FAILED: Build did NOT complete successfully (1 packages loaded)

But it's possible that I made that command wrong, and that an upstream envoy change is not required.

@dubious90 dubious90 added enhancement New feature or request tech-debt labels Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request tech-debt
Projects
None yet
Development

No branches or pull requests

1 participant