-
Notifications
You must be signed in to change notification settings - Fork 5.1k
format: run buildifier on .bzl files. #3824
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
Conversation
Risk Level: n/a Testing: ./tools/check_format.py fix Docs Changes: n/a Release Notes: n/a Signed-off-by: Piotr Sikora <piotrsikora@google.com>
@@ -145,36 +149,35 @@ def checkBuildLine(line, file_path, reportError): | |||
if not whitelistedForProtobufDeps(file_path) and '"protobuf"' in line: | |||
reportError("unexpected direct external dependency on protobuf, use " | |||
"//source/common/protobuf instead.") | |||
if envoy_build_rule_check and '@envoy//' in line: | |||
if envoy_build_rule_check and not isSkylarkFile(file_path) and '@envoy//' in line: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jmarantz do you remember why you've added this check for @envoy//
and whether or not it should apply to .bzl
files? My thinking is that we should retain @envoy//
there, but I'm missing the context for why this check was added in the first place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It didn't work with our import process. Another option would be to change our import process.
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
"envoy.filters.http.rbac": "//source/extensions/filters/http/rbac:config", | ||
"envoy.filters.http.router": "//source/extensions/filters/http/router:config", | ||
"envoy.filters.http.squash": "//source/extensions/filters/http/squash:config", | ||
"envoy.filters.http.buffer": "//source/extensions/filters/http/buffer:config", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we avoid having Buildifier apply to this situation? It seems there are advantages to readability for these configuration files in having block spacing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# buildifier: leave-alone
is ignored for dictionaries, to the only option is to completely skip buildifier
for this file (which is effectively the same thing, since this dictionary is the only thing in that file).
Having said that, both buildifier
and clang-format
are sacrificing readability for consistency on a regular basis, and I'm not sure if this is the worse offender and/or if we want to be in business of adding one-off exceptions.
I don't care too much, so I can exclude this file if you want. Your call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer we ignore in this case, since this is human read/write configuration, vs. code per se.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added to excluded files and reverted to previous version (sans trailing whitespace).
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
* origin/master: config: making v2-config-only a boolean flag (envoyproxy#3847) lc trie: add exclusive flag. (envoyproxy#3825) upstream: introduce PriorityStateManager, refactor EDS (envoyproxy#3783) test: deflaking header_integration_test (envoyproxy#3849) http: new style WebSockets, where headers and data are processed by the filter chain. (envoyproxy#3776) common: minor doc updates (envoyproxy#3845) fix master build (envoyproxy#3844) logging: Requiring details for RELEASE_ASSERT (envoyproxy#3842) test: add test for consistency of RawStatData internal memory representation (envoyproxy#3843) common: jittered backoff implementation (envoyproxy#3791) format: run buildifier on .bzl files. (envoyproxy#3824) Support mutable metadata for endpoints (envoyproxy#3814) test: deflaking a test, improving debugability (envoyproxy#3829) Update ApiConfigSource docs with grpc_services only for GRPC configs (envoyproxy#3834) Add hard-coded /hot_restart_version test (envoyproxy#3832) healthchecks: Add interval_jitter_percent healthcheck option (envoyproxy#3816) Signed-off-by: Snow Pettersen <snowp@squareup.com>
Risk Level: n/a
Testing: ./tools/check_format.py fix
Docs Changes: n/a
Release Notes: n/a
Signed-off-by: Piotr Sikora piotrsikora@google.com