github.com/bazelbuild/bazel-gazelle@v0.36.1-0.20240520142334-61b277ba6fed/internal/bzlmod/default_gazelle_overrides.bzl (about)

     1  # Copyright 2023 The Bazel Authors. All rights reserved.
     2  #
     3  # Licensed under the Apache License, Version 2.0 (the "License");
     4  # you may not use this file except in compliance with the License.
     5  # You may obtain a copy of the License at
     6  #
     7  #    http://www.apache.org/licenses/LICENSE-2.0
     8  #
     9  # Unless required by applicable law or agreed to in writing, software
    10  # distributed under the License is distributed on an "AS IS" BASIS,
    11  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  # See the License for the specific language governing permissions and
    13  # limitations under the License.
    14  
    15  visibility("private")
    16  
    17  DEFAULT_BUILD_FILE_GENERATION_BY_PATH = {
    18      "github.com/envoyproxy/protoc-gen-validate": "on",
    19      "github.com/google/safetext": "on",
    20      "github.com/grpc-ecosystem/grpc-gateway/v2": "on",
    21      "google.golang.org/grpc": "on",
    22  }
    23  
    24  DEFAULT_DIRECTIVES_BY_PATH = {
    25      "github.com/census-instrumentation/opencensus-proto": [
    26          "gazelle:proto disable",
    27      ],
    28      "github.com/envoyproxy/protoc-gen-validate": [
    29          "gazelle:build_file_name BUILD.bazel",
    30      ],
    31      "github.com/cockroachdb/errors": [
    32          "gazelle:proto disable",
    33      ],
    34      "github.com/gogo/googleapis": [
    35          "gazelle:proto disable",
    36      ],
    37      "github.com/gogo/protobuf": [
    38          "gazelle:proto disable",
    39      ],
    40      "github.com/google/cel-go": [
    41          "gazelle:go_naming_convention go_default_library",
    42      ],
    43      "github.com/google/gnostic": [
    44          "gazelle:proto disable",
    45      ],
    46      "github.com/google/gnostic-models": [
    47          "gazelle:proto disable",
    48      ],
    49      "github.com/google/safetext": [
    50          "gazelle:build_file_name BUILD.bazel",
    51          "gazelle:build_file_proto_mode disable_global",
    52      ],
    53      "github.com/googleapis/gax-go/v2": [
    54          "gazelle:proto disable",
    55      ],
    56      "github.com/googleapis/gnostic": [
    57          "gazelle:proto disable",
    58      ],
    59      "github.com/pseudomuto/protoc-gen-doc": [
    60          # The build file in github.com/mwitkow/go-proto-validators has both go_proto and gogo_proto targets, but the checked
    61          # in go files are generated by gogo proto. Resolving to the gogo proto target preserves the behavior of Go modules.
    62          "gazelle:resolve go github.com/mwitkow/go-proto-validators @com_github_mwitkow_go_proto_validators//:validators_gogo",
    63      ],
    64      "google.golang.org/grpc": [
    65          "gazelle:proto disable",
    66      ],
    67      "google.golang.org/protobuf": [
    68          "gazelle:proto disable",
    69      ],
    70      "k8s.io/api": [
    71          "gazelle:proto disable",
    72      ],
    73      "k8s.io/apiextensions-apiserver": [
    74          "gazelle:proto disable",
    75      ],
    76      "k8s.io/apimachinery": [
    77          "gazelle:go_generate_proto false",
    78          "gazelle:proto_import_prefix k8s.io/apimachinery",
    79      ],
    80  }
    81  
    82  DEFAULT_BUILD_EXTRA_ARGS_BY_PATH = {
    83      "github.com/census-instrumentation/opencensus-proto": [
    84          "-exclude=src",
    85      ],
    86  }