bazel-skylib/gazelle/bzl
Simon Stewart 60abca8fa2
Add the gazelle plugin to the distribution (#400)
* Add the gazelle plugin to the distribution

To avoid everyone needing to take a dep on `rules_go`, we
do the following:

1. Regular Bazel users need to load `bazel_skylib_gazelle_plugin_workspace`
   and call that, and then `bazel_skylib_gazelle_plugin_setup`

2. `bzlmod` users need do nothing, but we now include the
   `rules_go` dep in the `MODULE.bazel` shipped in the release.
    This is fine, because `bzlmod` will lazily load
    dependencies.

* Run buildifier

* Add docstring to `gazelle_setup.bzl`

* Move "internal only" marker

* Make @com_github_bazelbuild_buildtools visible in the deployed module

* Respond to review comments

* Move plugin to a nested workspace

* Run buildifier

* Restore the module declaration from `main`

* Bump versions of rules_go and gazelle used in the top-level module to match the ones in gazelle

* Respond to review comments and add gazelle to ignored directories so //... works as expected

* Add missing descriptor for stardoc

* Move gazelle hints into workspace files
2022-11-07 11:25:38 +01:00
..
testdata Handle "internal" directory visibility (#274) 2020-10-21 23:52:14 -06:00
BUILD Add the gazelle plugin to the distribution (#400) 2022-11-07 11:25:38 +01:00
README.md Move bzl ext (#265) 2020-08-20 13:14:55 -04:00
gazelle.go Fixing typo: allocate slice with the correct size (#383) 2022-08-16 12:00:42 -04:00
gazelle_test.go Add the gazelle plugin to the distribution (#400) 2022-11-07 11:25:38 +01:00

README.md

Gazelle

Gazelle is a BUILD file generator for Bazel. This directory contains a language extension for the Gazelle generator that allows it to automatically parse valid bzl_library targets for all .bzl files in a repo in which it runs. It will additionally include a deps entry tracking every .bzl that is loaded into the primary file.

This can be used, for example, to generate stardoc documentation for your .bzl files, both simplify the task of and improve the quality of documentation.