blob: f9e86765da3e43d01cf1182ca097436baebc9bb8 [file] [log] [blame] [edit]
load("//:def.bzl", "gazelle_binary")
load("//:def.bzl", "gazelle_generation_test")
# Exclude this entire directly from having anything gnerated by Gazelle. That
# way the test cases won't be fixed by `bazel run //:gazelle` when run in this
# repository.
# gazelle:exclude **
# This test Gazelle binary only has the "test_filegroup" plugin installed.
gazelle_binary(
name = "gazelle",
visibility = ["//visibility:private"],
languages = [
"//internal/language/test_filegroup",
],
)
gazelle_binary(
name = "gazelle_with_language_loads_from_flag",
visibility = ["//visibility:private"],
languages = [
"//internal/language/test_loads_from_flag",
],
)
[gazelle_generation_test(
# Name the test the path to the directory containing the WORKSPACE file.
name = file[0:-len("/WORKSPACE")],
gazelle_binary = ":gazelle" if "loads_from_flag" not in file else ":gazelle_with_language_loads_from_flag",
# This is a noop as the default is False. However, it does confirm that
# gazelle_generation_test accepts setting common test attributes.
local = False,
test_data = glob(
include = [file[0:-len("/WORKSPACE")] + "/**"],
),
) for file in glob(
include = ["**/WORKSPACE"],
)]