Skip to content

Commit

Permalink
Buildifier fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
aaliddell committed Sep 21, 2021
1 parent 1d110bc commit 98a3974
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 9 deletions.
2 changes: 0 additions & 2 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,6 @@ load("@io_bazel_rules_scala//scala:toolchains.bzl", "scala_register_toolchains")

scala_register_toolchains()

load("@rules_jvm_external//:defs.bzl", "maven_install")

maven_install(
name = "rules_proto_grpc_scala_maven",
artifacts = MAVEN_ARTIFACTS,
Expand Down
5 changes: 2 additions & 3 deletions doc/doc_template_compile.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ load(
"//:defs.bzl",
"ProtoPluginInfo",
"proto_compile_attrs",
"proto_compile_impl",
)
load("//internal:compile.bzl", "proto_compile")

# Create compile rule
def doc_template_compile_impl(ctx):
def doc_template_compile_impl(ctx): # buildifier: disable=function-docstring
# Load attrs that we pass as args
options = ctx.attr.options
extra_protoc_args = getattr(ctx.attr, "extra_protoc_args", [])
Expand All @@ -24,7 +23,7 @@ def doc_template_compile_impl(ctx):
ctx.file.template.path,
ctx.attr.name,
]
extra_protoc_files += [ctx.file.template]
extra_protoc_files.append(ctx.file.template)

# Execute with extracted attrs
return proto_compile(ctx, options, extra_protoc_args, extra_protoc_files)
Expand Down
1 change: 1 addition & 0 deletions example/routeguide/routeguide_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ def routeguide_test_matrix(name = "", clients = [], servers = [], database = "//
servers: The list of available routeguide servers.
database: The features list to provide to the test.
tagmap: The dict of tags to apply to specific languages or tests ("lang" or "lang_lang").
skip: Combinations of client and server to skip, e.g. "cpp_js"
Returns:
Nothing.
Expand Down
1 change: 1 addition & 0 deletions scala/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
load("@rules_java//java:defs.bzl", "java_binary")
load("//:defs.bzl", "proto_plugin")

proto_plugin(
Expand Down
2 changes: 1 addition & 1 deletion scala/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

load(
"//:repositories.bzl",
"GRPC_VERSION",
"GRPC_VERSION", # @unused
"io_bazel_rules_scala",
"io_grpc_grpc_java",
"rules_jvm_external",
Expand Down
5 changes: 2 additions & 3 deletions tools/rulegen/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ var docCustomRuleTemplateString = mustTemplate(`load(
"//:defs.bzl",
"ProtoPluginInfo",
"proto_compile_attrs",
"proto_compile_impl",
)
load("//internal:compile.bzl", "proto_compile")
# Create compile rule
def {{ .Rule.Name }}_impl(ctx):
def {{ .Rule.Name }}_impl(ctx): # buildifier: disable=function-docstring
# Load attrs that we pass as args
options = ctx.attr.options
extra_protoc_args = getattr(ctx.attr, "extra_protoc_args", [])
Expand All @@ -24,7 +23,7 @@ def {{ .Rule.Name }}_impl(ctx):
ctx.file.template.path,
ctx.attr.name,
]
extra_protoc_files += [ctx.file.template]
extra_protoc_files.append(ctx.file.template)
# Execute with extracted attrs
return proto_compile(ctx, options, extra_protoc_args, extra_protoc_files)
Expand Down

0 comments on commit 98a3974

Please sign in to comment.