Skip to content

Commit df8f6b5

Browse files
committed
Run buildifier
1 parent 64062ec commit df8f6b5

File tree

20 files changed

+914
-901
lines changed

20 files changed

+914
-901
lines changed

cc/BUILD.bazel

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ config_setting(
3030
)
3131

3232
bool_flag(
33-
name = "strong_stack_protector",
34-
build_setting_default = False,
35-
visibility = ["//visibility:public"],
33+
name = "strong_stack_protector",
34+
build_setting_default = False,
35+
visibility = ["//visibility:public"],
3636
)
3737

3838
config_setting(
39-
name = "_strong_stack_protector",
40-
flag_values = {":strong_stack_protector": "true"},
41-
visibility = ["//visibility:public"],
39+
name = "_strong_stack_protector",
40+
flag_values = {":strong_stack_protector": "true"},
41+
visibility = ["//visibility:public"],
4242
)
4343

4444
# Enable warnings in tests for deprecated declarations with --@rules_swiftnav//cc:tests_warn_deprecated_declarations=true
@@ -174,7 +174,6 @@ config_setting(
174174
visibility = ["//visibility:public"],
175175
)
176176

177-
178177
selects.config_setting_group(
179178
name = "enable_symbolizer_x86_64_linux",
180179
match_all = [
@@ -230,10 +229,10 @@ py_binary(
230229
)
231230

232231
py_binary(
233-
name = "checktags",
234-
srcs = [
235-
"checktags.py",
236-
],
237-
args = [],
238-
visibility = ["//visibility:public"],
232+
name = "checktags",
233+
srcs = [
234+
"checktags.py",
235+
],
236+
args = [],
237+
visibility = ["//visibility:public"],
239238
)

cc/check_allowed_cc_deps.bzl

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ DependencyLevelInfo = provider(
1616
fields = {
1717
"level": "Dependency level (0=internal, 1=prod, 2=safe, None=no level)",
1818
"portable": "Whether the target is portable",
19-
"label": "The target's label"
20-
}
19+
"label": "The target's label",
20+
},
2121
)
2222

2323
def _get_coding_level_from_tags(tags):
@@ -76,7 +76,7 @@ def _check_allowed_cc_deps_impl(target, ctx):
7676
return [DependencyLevelInfo(
7777
level = None,
7878
portable = current_portable,
79-
label = label_str
79+
label = label_str,
8080
)]
8181

8282
# Check dependencies
@@ -104,7 +104,7 @@ def _check_allowed_cc_deps_impl(target, ctx):
104104
target.label,
105105
_level_to_str(current_level),
106106
dep_info.label,
107-
_level_to_str(dep_level)
107+
_level_to_str(dep_level),
108108
)
109109
fail(error_msg)
110110

@@ -113,30 +113,31 @@ def _check_allowed_cc_deps_impl(target, ctx):
113113
error_msg = ("ERROR: Target {} is marked as portable but depends on {} which is not portable. " +
114114
"Portable targets can only depend on other portable targets.").format(
115115
target.label,
116-
dep_info.label
116+
dep_info.label,
117117
)
118118
fail(error_msg)
119119

120120
# Return provider for this target
121121
return [DependencyLevelInfo(
122122
level = current_level,
123123
portable = current_portable,
124-
label = label_str
124+
label = label_str,
125125
)]
126126

127127
check_allowed_cc_deps = aspect(
128128
implementation = _check_allowed_cc_deps_impl,
129129
attr_aspects = ["deps"],
130-
attrs = {}
130+
attrs = {},
131131
)
132132

133133
def _validate_allowed_deps_rule_impl(ctx):
134134
"""Rule that applies the validation aspect to specified targets."""
135+
135136
# This rule doesn't produce any output, it just triggers the aspect
136137
output = ctx.actions.declare_file(ctx.label.name + ".validation")
137138
ctx.actions.write(
138139
output = output,
139-
content = "Allowed C/C++ dependency validation passed\n"
140+
content = "Allowed C/C++ dependency validation passed\n",
140141
)
141142
return [DefaultInfo(files = depset([output]))]
142143

@@ -145,10 +146,10 @@ validate_allowed_cc_deps = rule(
145146
attrs = {
146147
"targets": attr.label_list(
147148
aspects = [check_allowed_cc_deps],
148-
doc = "Targets to validate"
149-
)
149+
doc = "Targets to validate",
150+
),
150151
},
151-
doc = "Validates allowed C/C++ dependencies for specified targets"
152+
doc = "Validates allowed C/C++ dependencies for specified targets",
152153
)
153154

154155
def validate_all_allowed_cc_deps(name, targets = ["//..."]):
@@ -161,5 +162,5 @@ def validate_all_allowed_cc_deps(name, targets = ["//..."]):
161162
validate_allowed_cc_deps(
162163
name = name,
163164
targets = targets,
164-
tags = ["manual"] # Don't build by default, only when explicitly requested
165+
tags = ["manual"], # Don't build by default, only when explicitly requested
165166
)

0 commit comments

Comments
 (0)