Skip to content

Commit

Permalink
Remove empty glob (#200)
Browse files Browse the repository at this point in the history
This directory is a package.

Fixes #198.
  • Loading branch information
illicitonion authored Sep 5, 2023
1 parent 25eaad3 commit e3e26fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion java/gazelle/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ go_test(
"generate_test.go",
"resolve_test.go",
],
data = glob(["testdata/**"]),
embed = [":gazelle"],
deps = [
"//java/gazelle/javaconfig",
Expand Down
6 changes: 4 additions & 2 deletions java/gazelle/testdata/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ load("@bazel_gazelle//:def.bzl", "gazelle_binary", "gazelle_generation_test")

# It's important not to add any BUILD.bazel files in any subdirectory of this one. If you find tests failing which look like files are missing, it's likely a BUILD.bazel file has accidentally been added.

# We don't want gazelle to run on this directory or its children, as having BUILD.bazel files would stop the test_data globs from reaching into the directories.
# gazelle:exclude
# We don't want gazelle to run on this directory's children, as having BUILD.bazel files would stop the test_data globs from reaching into the directories.
# We do, however, want to include this BUILD.bazel file in Gazelle's knowledge, otherwise gazelle will view this directory as not being a package and will include testdata/** as a `data` glob in the parent's test target.
# This causes problems when running Bazel with `--incompatible_disallow_empty_glob`.
# gazelle:exclude *

gazelle_binary(
name = "gazelle",
Expand Down

0 comments on commit e3e26fb

Please sign in to comment.