diff options
author | David Ostrovsky <david@ostrovsky.org> | 2019-06-18 09:37:51 +0200 |
---|---|---|
committer | David Pursehouse <david.pursehouse@gmail.com> | 2019-07-16 12:10:31 +0900 |
commit | bbef67e8d02e9baff1d23f98e7252ebba1221b84 (patch) | |
tree | 7b6e0f1389a0f1eb26de364ef8fb16bda0398e08 /org.eclipse.jgit.test/tests.bzl | |
parent | 74da1b2701fc3f736e53b25936dd566889097f8e (diff) | |
download | jgit-bbef67e8d02e9baff1d23f98e7252ebba1221b84.tar.gz jgit-bbef67e8d02e9baff1d23f98e7252ebba1221b84.zip |
Bazel: Fix lint warning flagged by buildifier
This change is fixing confusing name warning: [1].
./org.eclipse.jgit.test/tests.bzl:12: confusing-name:
Never use 'l', 'I', or 'O' as names (they're too easily confused
with 'I', 'l', or '0').
And is also fixing: "All calls to rules or macros should pass arguments
by keyword position argument" warning: [2].
./org.eclipse.jgit.test/BUILD:42: positional-args: All calls to rules
or macros should pass arguments by keyword (arg_name=value) syntax.
[1] https://github.com/bazelbuild/buildtools/blob/master/WARNINGS.md#confusing-name
[2] https://github.com/bazelbuild/buildtools/blob/master/WARNINGS.md#positional-args
Change-Id: If5c28ec8a1ddc1d1b1035bd07b838a2a564aea4f
Signed-off-by: David Ostrovsky <david@ostrovsky.org>
Diffstat (limited to 'org.eclipse.jgit.test/tests.bzl')
-rw-r--r-- | org.eclipse.jgit.test/tests.bzl | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/org.eclipse.jgit.test/tests.bzl b/org.eclipse.jgit.test/tests.bzl index 4963ecf9f8..7ff90d4846 100644 --- a/org.eclipse.jgit.test/tests.bzl +++ b/org.eclipse.jgit.test/tests.bzl @@ -8,14 +8,14 @@ def tests(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]) + package = name[len("org.eclipse.jgit_"):] + if package.startswith("internal_storage_"): + package = package[len("internal.storage_"):] + index = package.find("_") + if index > 0: + labels.append(package[:index]) else: - labels.append(i) + labels.append(index) if "lib" not in labels: labels.append("lib") |