Skip to content

Commit

Permalink
adding more default gazelle overrides (bazel-contrib#1701)
Browse files Browse the repository at this point in the history
* adding more default gazelle overrides

* remove go resolves

* remove all resolves

* disable proto for gogo/googleapis

* add comments
  • Loading branch information
linzhp authored Dec 27, 2023
1 parent 7780564 commit 2ff6075
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion internal/bzlmod/default_gazelle_overrides.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ DEFAULT_DIRECTIVES_BY_PATH = {
"github.com/envoyproxy/protoc-gen-validate": [
"gazelle:build_file_name BUILD.bazel",
],
"github.com/gogo/googleapis": [
"gazelle:proto disable",
],
"github.com/gogo/protobuf": [
"gazelle:proto disable",
],
Expand All @@ -47,6 +50,11 @@ DEFAULT_DIRECTIVES_BY_PATH = {
"github.com/googleapis/gnostic": [
"gazelle:proto disable",
],
"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",
],
Expand All @@ -57,7 +65,8 @@ DEFAULT_DIRECTIVES_BY_PATH = {
"gazelle:proto disable",
],
"k8s.io/apimachinery": [
"gazelle:proto disable",
"gazelle:go_generate_proto false",
"gazelle:proto_import_prefix k8s.io/apimachinery",
],
}

Expand Down

0 comments on commit 2ff6075

Please sign in to comment.