aboutsummaryrefslogtreecommitdiffhomepage
path: root/bazel/generate_cc.bzl
diff options
context:
space:
mode:
authorGravatar yang-g <yangg@google.com>2018-03-21 14:46:44 -0700
committerGravatar yang-g <yangg@google.com>2018-03-21 16:43:02 -0700
commit502ba748680cf58727fb08628231854d04c89103 (patch)
tree3c0ecb1dd99b8e1f026166f689b25c14a46c8788 /bazel/generate_cc.bzl
parent1cf63112589bf9dcb3a8fc42cbe29dea564c3df8 (diff)
Rename generate_mock to generate_mocks
Diffstat (limited to 'bazel/generate_cc.bzl')
-rw-r--r--bazel/generate_cc.bzl6
1 files changed, 3 insertions, 3 deletions
diff --git a/bazel/generate_cc.bzl b/bazel/generate_cc.bzl
index f88ee2f56f..e610123dc5 100644
--- a/bazel/generate_cc.bzl
+++ b/bazel/generate_cc.bzl
@@ -14,7 +14,7 @@ def generate_cc_impl(ctx):
if ctx.executable.plugin:
outs += [proto.path[label_len:-len(".proto")] + ".grpc.pb.h" for proto in protos]
outs += [proto.path[label_len:-len(".proto")] + ".grpc.pb.cc" for proto in protos]
- if ctx.attr.generate_mock:
+ if ctx.attr.generate_mocks:
outs += [proto.path[label_len:-len(".proto")] + "_mock.grpc.pb.h" for proto in protos]
else:
outs += [proto.path[label_len:-len(".proto")] + ".pb.h" for proto in protos]
@@ -26,7 +26,7 @@ def generate_cc_impl(ctx):
if ctx.executable.plugin:
arguments += ["--plugin=protoc-gen-PLUGIN=" + ctx.executable.plugin.path]
flags = list(ctx.attr.flags)
- if ctx.attr.generate_mock:
+ if ctx.attr.generate_mocks:
flags.append("generate_mock_code=true")
arguments += ["--PLUGIN_out=" + ",".join(flags) + ":" + dir_out]
additional_input = [ctx.executable.plugin]
@@ -76,7 +76,7 @@ _generate_cc = rule(
"well_known_protos" : attr.label(
mandatory = False,
),
- "generate_mock" : attr.bool(
+ "generate_mocks" : attr.bool(
default = False,
mandatory = False,
),