Name Date Size #Lines LOC

..--

bazel_tools/H25-Apr-2025-3425

defaultvisibility/H25-Apr-2025-3524

empty/H25-Apr-2025-2217

external/H25-Apr-2025-3323

import/H25-Apr-2025-3022

multidir/H25-Apr-2025-3223

nobuildfiles/H25-Apr-2025-86

private/H25-Apr-2025-6245

relative_import/H25-Apr-2025-6044

simple/H25-Apr-2025-2216

tests/H25-Apr-2025-2216

workspace_name/H25-Apr-2025-3223

README.mdH A D25-Apr-20251.9 KiB5736

README.md

1# Gazelle test cases
2
3This directory contains a suite of test cases for the Skylark language plugin
4for Gazelle.
5
6Please note that there are no `BUILD` or `BUILD.bazel` files in subdirs, instead
7there are `BUILD.in` and `BUILD.out` describing what the `BUILD` should look
8like initially and what the `BUILD` file should look like after the run. These
9names are special because they are not recognized by Bazel as a proper `BUILD`
10file, and therefore are included in the data dependency by the recursive data
11glob in `//gazelle:go_default_test`. If you would like to include any extremely
12complicated tests that contain proper `BUILD` files you will need to manually
13add them to the `//gazelle:go_default_test` target's `data` section.
14
15## `simple`
16
17Simple is a base test case that was used to validate the parser.
18
19## `nobuildfiles`
20
21A test just like `simple` that has no `BUILD` files at the beginning.
22
23## `import`
24
25Import is a test case that imports a `.bzl` from the same directory.
26
27## `multidir`
28
29Multidir is a test that has a `.bzl` that imports from a different dirrectory.
30
31## `tests`
32
33Using the skylib as an example, this test has `.bzl` files that end in
34`_tests.bzl` which are `load`ed into `BUILD` files and never imported by
35another repo.
36
37## `private`
38
39Using the skylib as an example, this test has `.bzl` files that live in a
40directory called `private` which is used to indicate that they are repo private.
41Note that this is distict from the expectations of go's `internal` where the
42relative position in the hierarchy determines the visibility.
43
44## `defaultvisibility`
45
46If the package declares a `default_visibility` the generated `bzl_library`
47should not set its own `visibility`.
48
49## `external`
50
51This test demonstrates that if you load from another repo, it is able to
52generate a `deps` entry for the dependency.
53
54## `empty`
55
56Gazelle has the ability to remove old and unused targets. Test that.
57