github.com/bazelbuild/bazel-gazelle@v0.36.1-0.20240520142334-61b277ba6fed/cmd/gazelle/BUILD.bazel (about)

     1  load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
     2  load("//:def.bzl", "DEFAULT_LANGUAGES", "gazelle_binary")
     3  
     4  gazelle_binary(
     5      name = "gazelle",
     6      languages = DEFAULT_LANGUAGES,
     7      visibility = ["//visibility:public"],
     8  )
     9  
    10  go_library(
    11      name = "gazelle_lib",
    12      # keep
    13      srcs = [
    14          "diff.go",
    15          "fix.go",
    16          "fix-update.go",
    17          "gazelle.go",
    18          "metaresolver.go",
    19          "print.go",
    20          "profiler.go",
    21          "update-repos.go",
    22      ],
    23      importpath = "github.com/bazelbuild/bazel-gazelle/cmd/gazelle",
    24      tags = ["manual"],
    25      visibility = ["//visibility:public"],
    26      deps = [
    27          "//config",
    28          "//flag",
    29          "//internal/wspace",
    30          "//label",
    31          "//language",
    32          "//language/go",
    33          "//language/proto",
    34          "//merger",
    35          "//repo",
    36          "//resolve",
    37          "//rule",
    38          "//walk",
    39          "@com_github_bazelbuild_buildtools//build",
    40          "@com_github_pmezard_go_difflib//difflib",
    41      ],
    42  )
    43  
    44  go_test(
    45      name = "gazelle_test",
    46      size = "small",
    47      srcs = [
    48          "diff_test.go",
    49          "fix_test.go",
    50          "integration_test.go",
    51          "langs.go",  # keep
    52          "profiler_test.go",
    53      ],
    54      args = ["-go_sdk=go_sdk"],
    55      data = ["@go_sdk//:files"],
    56      embed = [":gazelle_lib"],
    57      deps = [
    58          "//config",
    59          "//internal/wspace",
    60          "//testtools",
    61          "@com_github_google_go_cmp//cmp",
    62          "@io_bazel_rules_go//go/tools/bazel:go_default_library",
    63      ],
    64  )
    65  
    66  filegroup(
    67      name = "all_files",
    68      testonly = True,
    69      srcs = [
    70          "BUILD.bazel",
    71          "diff.go",
    72          "diff_test.go",
    73          "fix.go",
    74          "fix-update.go",
    75          "fix_test.go",
    76          "gazelle.go",
    77          "integration_test.go",
    78          "langs.go",
    79          "metaresolver.go",
    80          "print.go",
    81          "profiler.go",
    82          "profiler_test.go",
    83          "update-repos.go",
    84      ],
    85      visibility = ["//visibility:public"],
    86  )