Skip to content

Commit adf45c4

Browse files
committed
Good buildifier ws changes
Pointed out in #100 (the other changes buildifier would propose are, I think, a net negative to readability)
1 parent 1266d6a commit adf45c4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ refresh_compile_commands(
1313
# Implementation:
1414
# If you are looking into the implementation, start with the overview in ImplementationReadme.md.
1515

16-
exports_files(["refresh.template.py"]) # For implicit use by refresh_compile_commands.
16+
exports_files(["refresh.template.py"]) # For implicit use by refresh_compile_commands.

refresh_compile_commands.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def refresh_compile_commands(
6868
# In Python, `type(x) == y` is an antipattern, but [Starlark doesn't support inheritance](https://bazel.build/rules/language), so `isinstance` doesn't exist, and this is the correct way to switch on type.
6969
if not targets: # Default to all targets in main workspace
7070
targets = {"@//...": ""}
71-
elif type(targets) == "select": # Allow select: https://bazel.build/reference/be/functions#select
71+
elif type(targets) == "select": # Allow select: https://bazel.build/reference/be/functions#select
7272
# Pass select() to _expand_template to make it work
7373
# see https://bazel.build/docs/configurable-attributes#faq-select-macro
7474
pass
@@ -103,7 +103,7 @@ _expand_template = rule(
103103
attrs = {
104104
"labels_to_flags": attr.string_dict(mandatory = True), # string keys instead of label_keyed because Bazel doesn't support parsing wildcard target patterns (..., *, :all) in BUILD attributes.
105105
"exclude_external_sources": attr.bool(default = False),
106-
"exclude_headers": attr.string(values = ["all", "external", ""]), # "" needed only for compatibility with Bazel < 3.6.0
106+
"exclude_headers": attr.string(values = ["all", "external", ""]), # "" needed only for compatibility with Bazel < 3.6.0
107107
"_script_template": attr.label(allow_single_file = True, default = "refresh.template.py"),
108108
# For Windows INCLUDE. If this were eliminated, for example by the resolution of https://github.com/clangd/clangd/issues/123, we'd be able to just use a macro and skylib's expand_template rule: https://github.com/bazelbuild/bazel-skylib/pull/330
109109
# Once https://github.com/bazelbuild/bazel/pull/17108 is widely released, we should be able to eliminate this and get INCLUDE directly. Perhaps for 7.0? Should be released in the sucessor to 6.0

0 commit comments

Comments
 (0)