]> source.dussan.org Git - jgit.git/commitdiff
Bazel: Format all build files with buildifier 0.15.0 53/128353/1
authorDavid Pursehouse <david.pursehouse@gmail.com>
Thu, 30 Aug 2018 06:27:20 +0000 (15:27 +0900)
committerDavid Pursehouse <david.pursehouse@gmail.com>
Thu, 30 Aug 2018 06:27:20 +0000 (15:27 +0900)
Change-Id: I8343b723da6e40d5ae7fc45c84f64c31276bd5dc
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
lib/BUILD
org.eclipse.jgit.test/BUILD
org.eclipse.jgit.test/tests.bzl
tools/bazlets.bzl

index 827e6b6fc6f8d4b764083f9e074990315156e06f..ffe66a3d89e043f08c1ddfb8ff6ac03dfd9a1f33 100644 (file)
--- a/lib/BUILD
+++ b/lib/BUILD
@@ -115,9 +115,9 @@ java_library(
     testonly = 1,
     visibility = ["//visibility:public"],
     exports = [
-       "@junit//jar",
-       "@hamcrest_core//jar",
-       "@hamcrest_library//jar",
+        "@hamcrest_core//jar",
+        "@hamcrest_library//jar",
+        "@junit//jar",
     ],
 )
 
index ae6f24223c04da9322c6b43e1f6e9fe0e9ff9dce..bbda838f00990ea6fa8de344e48c4e7d0bebb258 100644 (file)
@@ -33,7 +33,7 @@ DATA = [
 
 tests(glob(
     ["tst/**/*.java"],
-    exclude = HELPERS + DATA
+    exclude = HELPERS + DATA,
 ))
 
 java_library(
@@ -54,8 +54,8 @@ java_import(
 )
 
 genrule2(
-  name = 'tst_rsrc_jar',
-  cmd = 'o=$$PWD/$@ && tar cf - $(SRCS) | tar -C $$TMP --strip-components=2 -xf - && cd  $$TMP && zip -qr $$o .',
-  srcs = glob(['tst-rsrc/**']),
-  outs = ['tst_rsrc.jar',],
+    name = "tst_rsrc_jar",
+    srcs = glob(["tst-rsrc/**"]),
+    outs = ["tst_rsrc.jar"],
+    cmd = "o=$$PWD/$@ && tar cf - $(SRCS) | tar -C $$TMP --strip-components=2 -xf - && cd  $$TMP && zip -qr $$o .",
 )
index 9cadc7463ade9f10362116bf7abf8d65124ccc1a..8ae0065a4c04037f7bc707a80c59193283303e85 100644 (file)
@@ -4,45 +4,45 @@ load(
 )
 
 def tests(tests):
-  for src in tests:
-    name = src[len('tst/'):len(src)-len('.java')].replace('/', '_')
-    labels = []
-    if name.startswith('org_eclipse_jgit_'):
-      l = name[len('org.eclipse.jgit_'):]
-      if l.startswith('internal_storage_'):
-        l = l[len('internal.storage_'):]
-      i = l.find('_')
-      if i > 0:
-        labels.append(l[:i])
-      else:
-        labels.append(i)
-    if 'lib' not in labels:
-      labels.append('lib')
+    for src in tests:
+        name = src[len("tst/"):len(src) - len(".java")].replace("/", "_")
+        labels = []
+        if name.startswith("org_eclipse_jgit_"):
+            l = name[len("org.eclipse.jgit_"):]
+            if l.startswith("internal_storage_"):
+                l = l[len("internal.storage_"):]
+            i = l.find("_")
+            if i > 0:
+                labels.append(l[:i])
+            else:
+                labels.append(i)
+        if "lib" not in labels:
+            labels.append("lib")
 
-    additional_deps = []
-    if src.endswith("RootLocaleTest.java"):
-      additional_deps = [
-        '//org.eclipse.jgit.pgm:pgm',
-        '//org.eclipse.jgit.ui:ui',
-      ]
-    if src.endswith("WalkEncryptionTest.java"):
-      additional_deps = [
-        '//org.eclipse.jgit:insecure_cipher_factory',
-      ]
+        additional_deps = []
+        if src.endswith("RootLocaleTest.java"):
+            additional_deps = [
+                "//org.eclipse.jgit.pgm:pgm",
+                "//org.eclipse.jgit.ui:ui",
+            ]
+        if src.endswith("WalkEncryptionTest.java"):
+            additional_deps = [
+                "//org.eclipse.jgit:insecure_cipher_factory",
+            ]
 
-    junit_tests(
-      name = name,
-      tags = labels,
-      srcs = [src],
-      deps = additional_deps + [
-        ':helpers',
-        ':tst_rsrc',
-        '//lib:javaewah',
-        '//lib:junit',
-        '//lib:slf4j-api',
-        '//org.eclipse.jgit:jgit',
-        '//org.eclipse.jgit.junit:junit',
-        '//org.eclipse.jgit.lfs:jgit-lfs',
-      ],
-      jvm_flags = ["-Xmx256m", "-Dfile.encoding=UTF-8"],
-    )
+        junit_tests(
+            name = name,
+            tags = labels,
+            srcs = [src],
+            deps = additional_deps + [
+                ":helpers",
+                ":tst_rsrc",
+                "//lib:javaewah",
+                "//lib:junit",
+                "//lib:slf4j-api",
+                "//org.eclipse.jgit:jgit",
+                "//org.eclipse.jgit.junit:junit",
+                "//org.eclipse.jgit.lfs:jgit-lfs",
+            ],
+            jvm_flags = ["-Xmx256m", "-Dfile.encoding=UTF-8"],
+        )
index e14e488492c9e7dcc1d3b65fedc0f65432e2855e..f97b72c828ce53efcb8245c579df410fed375c4e 100644 (file)
@@ -1,17 +1,16 @@
 NAME = "com_googlesource_gerrit_bazlets"
 
 def load_bazlets(
-    commit,
-    local_path = None
-  ):
-  if not local_path:
-      native.git_repository(
-          name = NAME,
-          remote = "https://gerrit.googlesource.com/bazlets",
-          commit = commit,
-      )
-  else:
-      native.local_repository(
-          name = NAME,
-          path = local_path,
-      )
+        commit,
+        local_path = None):
+    if not local_path:
+        native.git_repository(
+            name = NAME,
+            remote = "https://gerrit.googlesource.com/bazlets",
+            commit = commit,
+        )
+    else:
+        native.local_repository(
+            name = NAME,
+            path = local_path,
+        )