The release docs for bazel_skylib_gazelle_plugin only show how to add it as a dependency to your MODULE.bazel file, but there is more work necessary to integrate the plugin into a gazelle run.
It seems to also need something like this change to update a gazelle target to include it?
-load("@gazelle//:def.bzl", "gazelle")
+load("@gazelle//:def.bzl", "gazelle", "gazelle_binary")
+gazelle_binary(
+ name = "gazelle_bin",
+ languages = [
+ "@gazelle//language/bazel/visibility",
+ "@gazelle//language/proto",
+ "@gazelle//language/go",
+ "@bazel_skylib_gazelle_plugin//bzl:bzl",
+ ],
+)
+
gazelle(
name = "gazelle",
+ gazelle = ":gazelle_bin",
prefix = "founding",
)
But perhaps there's a better way to do it? I'm not sure.
The release docs for bazel_skylib_gazelle_plugin only show how to add it as a dependency to your MODULE.bazel file, but there is more work necessary to integrate the plugin into a gazelle run.
It seems to also need something like this change to update a
gazelletarget to include it?But perhaps there's a better way to do it? I'm not sure.