Bazel: Fix more buildifier warnings

This fixes buildifier warnings that were not fixed in automatic
mode:

  $ find . \( -name BUILD -o -name "*.bzl" \) -print \
      | xargs buildifier --lint=warn

* Remove unused variables
* Pattern `src/test/java/com/google/gerrit/server/project/Util.java`
  has no wildcard ('*')
* All calls to rules or macros should pass arguments by keyword
  (arg_name=value) syntax
* ctx.new_file is deprecated, used ctx.actions.declare_file instead

Change-Id: I1f8a04e8d576ab637ba8a46118720218ec486fff
This commit is contained in:
David Ostrovsky
2018-11-25 05:28:29 +01:00
committed by David Pursehouse
parent 88d0885a57
commit aeaa73e68c
5 changed files with 5 additions and 14 deletions

View File

@@ -6,8 +6,6 @@ load("//tools/bzl:junit.bzl", "junit_tests")
SRC = "src/main/java/com/google/gerrit/extensions/"
SRCS = glob([SRC + "**/*.java"])
EXT_API_SRCS = glob([SRC + "client/*.java"])
gwt_module(

View File

@@ -9,7 +9,7 @@ load("//tools/bzl:license.bzl", "license_test")
gwt_genrule()
gwt_genrule("_r")
gwt_genrule(suffix = "_r")
gen_ui_module(name = "ui_module")

View File

@@ -1,11 +1,5 @@
load("//tools/bzl:javadoc.bzl", "java_doc")
SRCS = [
"gerrit-server/src/main/java/",
"gerrit-httpd/src/main/java/",
"gerrit-sshd/src/main/java/",
]
PLUGIN_API = [
"//gerrit-httpd:httpd",
"//gerrit-pgm:init-api",

View File

@@ -113,8 +113,9 @@ TESTUTIL_DEPS = [
TESTUTIL = glob([
"src/test/java/com/google/gerrit/testutil/**/*.java",
]) + [
"src/test/java/com/google/gerrit/server/project/Util.java",
])
]
java_library(
name = "testutil",

View File

@@ -307,10 +307,8 @@ Outputs:
def _vulcanize_impl(ctx):
# intermediate artifact.
vulcanized = ctx.new_file(
ctx.configuration.genfiles_dir,
ctx.outputs.html,
".vulcanized.html",
vulcanized = ctx.actions.declare_file(
ctx.outputs.html.path + ".vulcanized.html",
)
destdir = ctx.outputs.html.path + ".dir"
zips = [z for d in ctx.attr.deps for z in d.transitive_zipfiles]