aboutsummaryrefslogtreecommitdiff
path: root/protobuf.bzl
diff options
context:
space:
mode:
authorJisi Liu <jisi.liu@gmail.com>2015-10-14 17:20:05 -0700
committerJisi Liu <jisi.liu@gmail.com>2015-10-14 17:20:05 -0700
commitee8131a62f2c2b3cf12c6899214dd48ee0907902 (patch)
tree7d379b4271d133d461ea069fd881c089fe0c503d /protobuf.bzl
parent39362b35b236242729cc5a0cb6fb0f7233fecd5e (diff)
downloadprotobuf-ee8131a62f2c2b3cf12c6899214dd48ee0907902.tar.gz
protobuf-ee8131a62f2c2b3cf12c6899214dd48ee0907902.tar.bz2
protobuf-ee8131a62f2c2b3cf12c6899214dd48ee0907902.zip
buildifier the file
Diffstat (limited to 'protobuf.bzl')
-rw-r--r--protobuf.bzl25
1 files changed, 14 insertions, 11 deletions
diff --git a/protobuf.bzl b/protobuf.bzl
index 63ef95fb..a6ef20e1 100644
--- a/protobuf.bzl
+++ b/protobuf.bzl
@@ -1,6 +1,5 @@
# -*- mode: python; -*- PYTHON-PREPROCESSING-REQUIRED
-
def _gen_dir(ctx):
if not ctx.attr.prefix:
return ctx.label.package
@@ -49,17 +48,21 @@ def _proto_srcs_impl(ctx):
)
_proto_srcs = rule(
- implementation = _proto_srcs_impl,
- output_to_genfiles = True,
attrs = {
- "srcs": attr.label_list(allow_files=True),
- "deps": attr.label_list(providers=["proto"]),
- "prefix": attr.string(),
- "protoc": attr.label(executable=True, single_file=True, mandatory=True),
- "gen_cc": attr.bool(),
- "gen_py": attr.bool(),
- "outs": attr.output_list()
- }
+ "srcs": attr.label_list(allow_files = True),
+ "deps": attr.label_list(providers = ["proto"]),
+ "prefix": attr.string(),
+ "protoc": attr.label(
+ executable = True,
+ single_file = True,
+ mandatory = True,
+ ),
+ "gen_cc": attr.bool(),
+ "gen_py": attr.bool(),
+ "outs": attr.output_list(),
+ },
+ output_to_genfiles = True,
+ implementation = _proto_srcs_impl,
)
def cc_proto_library(