diff --git a/internal/bzlmod/default_gazelle_overrides.bzl b/internal/bzlmod/default_gazelle_overrides.bzl index 5cd96fcf6..e82239f0a 100644 --- a/internal/bzlmod/default_gazelle_overrides.bzl +++ b/internal/bzlmod/default_gazelle_overrides.bzl @@ -22,60 +22,29 @@ DEFAULT_BUILD_FILE_GENERATION_BY_PATH = { } DEFAULT_DIRECTIVES_BY_PATH = { - "github.com/census-instrumentation/opencensus-proto": [ - "gazelle:proto disable", - ], "github.com/envoyproxy/protoc-gen-validate": [ "gazelle:build_file_name BUILD.bazel", - ], - "github.com/cockroachdb/errors": [ - "gazelle:proto disable", - ], - "github.com/gogo/googleapis": [ - "gazelle:proto disable", - ], - "github.com/gogo/protobuf": [ - "gazelle:proto disable", + "gazelle:proto disable_global", ], "github.com/google/cel-go": [ "gazelle:go_naming_convention go_default_library", - ], - "github.com/google/gnostic": [ - "gazelle:proto disable", - ], - "github.com/google/gnostic-models": [ - "gazelle:proto disable", + "gazelle:proto disable_global", ], "github.com/google/safetext": [ "gazelle:build_file_name BUILD.bazel", "gazelle:build_file_proto_mode disable_global", - ], - "github.com/googleapis/gax-go/v2": [ - "gazelle:proto disable", - ], - "github.com/googleapis/gnostic": [ - "gazelle:proto disable", + "gazelle:proto disable_global", ], "github.com/pseudomuto/protoc-gen-doc": [ # The build file in github.com/mwitkow/go-proto-validators has both go_proto and gogo_proto targets, but the checked # in go files are generated by gogo proto. Resolving to the gogo proto target preserves the behavior of Go modules. "gazelle:resolve go github.com/mwitkow/go-proto-validators @com_github_mwitkow_go_proto_validators//:validators_gogo", - ], - "google.golang.org/grpc": [ - "gazelle:proto disable", - ], - "google.golang.org/protobuf": [ - "gazelle:proto disable", - ], - "k8s.io/api": [ - "gazelle:proto disable", - ], - "k8s.io/apiextensions-apiserver": [ - "gazelle:proto disable", + "gazelle:proto disable_global", ], "k8s.io/apimachinery": [ "gazelle:go_generate_proto false", "gazelle:proto_import_prefix k8s.io/apimachinery", + "gazelle:proto disable_global", ], } diff --git a/internal/bzlmod/go_deps.bzl b/internal/bzlmod/go_deps.bzl index 140465860..2fb8a235e 100644 --- a/internal/bzlmod/go_deps.bzl +++ b/internal/bzlmod/go_deps.bzl @@ -144,7 +144,7 @@ def _get_override_or_default(specific_overrides, gazelle_default_attributes, def return default_value def _get_directives(path, gazelle_overrides, gazelle_default_attributes): - return _get_override_or_default(gazelle_overrides, gazelle_default_attributes, DEFAULT_DIRECTIVES_BY_PATH, path, [], "directives") + return _get_override_or_default(gazelle_overrides, gazelle_default_attributes, DEFAULT_DIRECTIVES_BY_PATH, path, ["gazelle:proto disable_global"], "directives") def _get_build_file_generation(path, gazelle_overrides, gazelle_default_attributes): # The default value for build_file_generation is "auto" if no override is found, but will default to "on" if an override is found.