summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Pursehouse <dpursehouse@collab.net>2019-01-09 21:21:52 +0900
committerDavid Pursehouse <dpursehouse@collab.net>2019-01-09 21:22:10 +0900
commit88d0885a57c31420480e72cf336f20396f622639 (patch)
tree5b635620ae6cf3a99dfe8e60f0150c8f95c38cc9
parent930f29e2fde16e546cbf4f895ad304d1318f2cb2 (diff)
Bazel: Automatically fix lint errors with buildifier 0.20.0
$ buildifier --version buildifier version: 0.20.0 buildifier scm revision: db073457c5a56d810e46efc18bb93a4fd7aa7b5e Change-Id: Ia14bf16aa6e61ea58645a379da2a871ca3d40d0d
-rw-r--r--lib/jgit/jgit.bzl4
-rw-r--r--tools/bzl/asciidoc.bzl32
-rw-r--r--tools/bzl/gwt.bzl14
-rw-r--r--tools/bzl/javadoc.bzl2
-rw-r--r--tools/bzl/js.bzl36
-rw-r--r--tools/bzl/maven_jar.bzl10
6 files changed, 49 insertions, 49 deletions
diff --git a/lib/jgit/jgit.bzl b/lib/jgit/jgit.bzl
index 874cb0f817..1b7e652fe4 100644
--- a/lib/jgit/jgit.bzl
+++ b/lib/jgit/jgit.bzl
@@ -62,11 +62,11 @@ def jgit_maven_repos():
def jgit_dep(name):
mapping = {
+ "@jgit-archive//jar": "@jgit//org.eclipse.jgit.archive:jgit-archive",
"@jgit-junit//jar": "@jgit//org.eclipse.jgit.junit:junit",
- "@jgit-lib//jar:src": "@jgit//org.eclipse.jgit:libjgit-src.jar",
"@jgit-lib//jar": "@jgit//org.eclipse.jgit:jgit",
+ "@jgit-lib//jar:src": "@jgit//org.eclipse.jgit:libjgit-src.jar",
"@jgit-servlet//jar": "@jgit//org.eclipse.jgit.http.server:jgit-servlet",
- "@jgit-archive//jar": "@jgit//org.eclipse.jgit.archive:jgit-archive",
}
if LOCAL_JGIT_REPO:
diff --git a/tools/bzl/asciidoc.bzl b/tools/bzl/asciidoc.bzl
index 61774720a6..42b3d9ae76 100644
--- a/tools/bzl/asciidoc.bzl
+++ b/tools/bzl/asciidoc.bzl
@@ -56,17 +56,17 @@ def _replace_macros_impl(ctx):
_replace_macros = rule(
attrs = {
- "_exe": attr.label(
- default = Label("//Documentation:replace_macros.py"),
- allow_single_file = True,
- ),
"src": attr.label(
mandatory = True,
allow_single_file = [".txt"],
),
- "suffix": attr.string(mandatory = True),
- "searchbox": attr.bool(default = True),
"out": attr.output(mandatory = True),
+ "searchbox": attr.bool(default = True),
+ "suffix": attr.string(mandatory = True),
+ "_exe": attr.label(
+ default = Label("//Documentation:replace_macros.py"),
+ allow_single_file = True,
+ ),
},
implementation = _replace_macros_impl,
)
@@ -123,23 +123,23 @@ def _asciidoc_impl(ctx):
)
_asciidoc_attrs = {
- "_exe": attr.label(
- default = Label("//lib/asciidoctor:asciidoc"),
- cfg = "host",
- allow_files = True,
- executable = True,
- ),
"srcs": attr.label_list(
mandatory = True,
allow_files = True,
),
+ "attributes": attr.string_list(),
+ "backend": attr.string(),
+ "suffix": attr.string(mandatory = True),
"version": attr.label(
default = Label("//:version.txt"),
allow_single_file = True,
),
- "suffix": attr.string(mandatory = True),
- "backend": attr.string(),
- "attributes": attr.string_list(),
+ "_exe": attr.label(
+ default = Label("//lib/asciidoctor:asciidoc"),
+ cfg = "host",
+ allow_files = True,
+ executable = True,
+ ),
}
_asciidoc = rule(
@@ -293,11 +293,11 @@ _asciidoc_zip = rule(
mandatory = True,
allow_single_file = [".zip"],
),
+ "directory": attr.string(mandatory = True),
"resources": attr.label_list(
mandatory = True,
allow_files = True,
),
- "directory": attr.string(mandatory = True),
},
outputs = {
"out": "%{name}.zip",
diff --git a/tools/bzl/gwt.bzl b/tools/bzl/gwt.bzl
index a0500bdb66..b94ea51a75 100644
--- a/tools/bzl/gwt.bzl
+++ b/tools/bzl/gwt.bzl
@@ -33,9 +33,9 @@ BROWSERS = [
ALIASES = {
"chrome": "safari",
+ "edge": "gecko1_8",
"firefox": "gecko1_8",
"msie": "ie10",
- "edge": "gecko1_8",
}
MODULE = "com.google.gerrit.GerritGwtUI"
@@ -213,14 +213,14 @@ def _get_transitive_closure(ctx):
gwt_binary = rule(
attrs = {
- "user_agent": attr.string(),
- "style": attr.string(default = "OBF"),
- "optimize": attr.string(default = "9"),
- "deps": attr.label_list(allow_files = jar_filetype),
- "module": attr.string_list(default = [MODULE]),
- "module_deps": attr.label_list(allow_files = jar_filetype),
"compiler_args": attr.string_list(),
"jvm_args": attr.string_list(),
+ "module": attr.string_list(default = [MODULE]),
+ "module_deps": attr.label_list(allow_files = jar_filetype),
+ "optimize": attr.string(default = "9"),
+ "style": attr.string(default = "OBF"),
+ "user_agent": attr.string(),
+ "deps": attr.label_list(allow_files = jar_filetype),
"_jdk": attr.label(
default = Label("//tools/defaults:jdk"),
),
diff --git a/tools/bzl/javadoc.bzl b/tools/bzl/javadoc.bzl
index b304db9bb1..d315f8f6f6 100644
--- a/tools/bzl/javadoc.bzl
+++ b/tools/bzl/javadoc.bzl
@@ -63,10 +63,10 @@ def _impl(ctx):
java_doc = rule(
attrs = {
+ "external_docs": attr.string_list(),
"libs": attr.label_list(allow_files = False),
"pkgs": attr.string_list(),
"title": attr.string(),
- "external_docs": attr.string_list(),
"_jdk": attr.label(
default = Label("@bazel_tools//tools/jdk:current_java_runtime"),
allow_files = True,
diff --git a/tools/bzl/js.bzl b/tools/bzl/js.bzl
index 28bc0a9624..3a696ddd77 100644
--- a/tools/bzl/js.bzl
+++ b/tools/bzl/js.bzl
@@ -47,9 +47,9 @@ def _npm_binary_impl(ctx):
npm_binary = repository_rule(
attrs = {
+ "repository": attr.string(default = NPMJS),
# Label resolves within repo of the .bzl file.
"_download_script": attr.label(default = Label("//tools:download_file.py")),
- "repository": attr.string(default = NPMJS),
},
local = True,
implementation = _npm_binary_impl,
@@ -130,13 +130,13 @@ def _bash(ctx, cmd):
bower_archive = repository_rule(
_bower_archive,
attrs = {
- "_bower_archive": attr.label(default = Label("@bower//:%s" % _npm_tarball("bower"))),
- "_run_npm": attr.label(default = Label("//tools/js:run_npm_binary.py")),
- "_download_bower": attr.label(default = Label("//tools/js:download_bower.py")),
- "sha1": attr.string(mandatory = True),
- "version": attr.string(mandatory = True),
"package": attr.string(mandatory = True),
"semver": attr.string(),
+ "sha1": attr.string(mandatory = True),
+ "version": attr.string(mandatory = True),
+ "_bower_archive": attr.label(default = Label("@bower//:%s" % _npm_tarball("bower"))),
+ "_download_bower": attr.label(default = Label("//tools/js:download_bower.py")),
+ "_run_npm": attr.label(default = Label("//tools/js:run_npm_binary.py")),
},
)
@@ -217,12 +217,12 @@ js_component = rule(
_bower_component = rule(
_bower_component_impl,
attrs = dict(_common_attrs.items() + {
- "zipfile": attr.label(allow_single_file = [".zip"]),
"license": attr.label(allow_single_file = True),
- "version_json": attr.label(allow_files = [".json"]),
# If set, define by hand, and don't regenerate this entry in bower2bazel.
"seed": attr.bool(default = False),
+ "version_json": attr.label(allow_files = [".json"]),
+ "zipfile": attr.label(allow_single_file = [".zip"]),
}.items()),
)
@@ -291,8 +291,8 @@ bower_component_bundle = rule(
_bower_component_bundle_impl,
attrs = _common_attrs,
outputs = {
- "zip": "%{name}.zip",
"version_json": "%{name}-versions.json",
+ "zip": "%{name}.zip",
},
)
"""Groups a set of bower components together in a zip file.
@@ -392,11 +392,6 @@ def _vulcanize_impl(ctx):
_vulcanize_rule = rule(
_vulcanize_impl,
attrs = {
- "deps": attr.label_list(providers = ["transitive_zipfiles"]),
- "app": attr.label(
- mandatory = True,
- allow_single_file = True,
- ),
"srcs": attr.label_list(allow_files = [
".js",
".html",
@@ -404,7 +399,16 @@ _vulcanize_rule = rule(
".css",
".ico",
]),
+ "app": attr.label(
+ mandatory = True,
+ allow_single_file = True,
+ ),
"pkg": attr.string(mandatory = True),
+ "deps": attr.label_list(providers = ["transitive_zipfiles"]),
+ "_crisper_archive": attr.label(
+ default = Label("@crisper//:%s" % _npm_tarball("crisper")),
+ allow_single_file = True,
+ ),
"_run_npm": attr.label(
default = Label("//tools/js:run_npm_binary.py"),
allow_single_file = True,
@@ -413,10 +417,6 @@ _vulcanize_rule = rule(
default = Label("@vulcanize//:%s" % _npm_tarball("vulcanize")),
allow_single_file = True,
),
- "_crisper_archive": attr.label(
- default = Label("@crisper//:%s" % _npm_tarball("crisper")),
- allow_single_file = True,
- ),
},
outputs = {
"html": "%{name}.html",
diff --git a/tools/bzl/maven_jar.bzl b/tools/bzl/maven_jar.bzl
index 2ebb2c248b..05f18bd14a 100644
--- a/tools/bzl/maven_jar.bzl
+++ b/tools/bzl/maven_jar.bzl
@@ -164,15 +164,15 @@ def _maven_jar_impl(ctx):
maven_jar = repository_rule(
attrs = {
"artifact": attr.string(mandatory = True),
+ "attach_source": attr.bool(default = True),
+ "exclude": attr.string_list(),
+ "repository": attr.string(default = MAVEN_CENTRAL),
"sha1": attr.string(),
"src_sha1": attr.string(),
- "_download_script": attr.label(default = Label("//tools:download_file.py")),
- "repository": attr.string(default = MAVEN_CENTRAL),
- "attach_source": attr.bool(default = True),
"unsign": attr.bool(default = False),
- "deps": attr.string_list(),
"exports": attr.string_list(),
- "exclude": attr.string_list(),
+ "deps": attr.string_list(),
+ "_download_script": attr.label(default = Label("//tools:download_file.py")),
},
local = True,
implementation = _maven_jar_impl,