chore: run gazelle for golang (#305)

This commit is contained in:
Greg Magolan 2023-01-01 15:37:00 -08:00 committed by GitHub
parent bad190e3dd
commit 4ad1dc2398
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 7 deletions

View File

@ -1,6 +1,6 @@
load("@aspect_bazel_lib_host//:defs.bzl", "host")
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("@bazel_gazelle//:def.bzl", "gazelle", "gazelle_binary")
load("@bazel_gazelle//:def.bzl", "DEFAULT_LANGUAGES", "gazelle", "gazelle_binary")
load("//lib:write_source_files.bzl", "write_source_files")
load("//lib:yq.bzl", "yq")
load("//lib:diff_test.bzl", "diff_test")
@ -8,9 +8,13 @@ load("//lib:testing.bzl", "assert_contains")
load("@bazel_skylib//rules:write_file.bzl", "write_file")
load("@bazel_skylib//rules:copy_file.bzl", "copy_file")
# gazelle:prefix github.com/aspect-build/bazel-lib
gazelle_binary(
name = "gazelle_bin",
languages = ["@bazel_skylib//gazelle/bzl"],
languages = DEFAULT_LANGUAGES + [
"@bazel_skylib//gazelle/bzl",
],
)
gazelle(

View File

@ -41,11 +41,11 @@ diff_test(
copy_file(
name = "copy_same_file_a",
src = "file1",
out = "file1_copy_a"
out = "file1_copy_a",
)
copy_file(
name = "copy_same_file_b",
src = "file1",
out = "file1_copy_b"
)
out = "file1_copy_b",
)

View File

@ -1,7 +1,7 @@
load("@bazel_skylib//rules:write_file.bzl", "write_file")
load("//lib:transitions.bzl", "platform_transition_binary", "platform_transition_filegroup")
load("//lib:diff_test.bzl", "diff_test")
load("@io_bazel_rules_go//go:def.bzl", "go_binary")
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
platform(
name = "armv7_linux",
@ -104,8 +104,9 @@ diff_test(
go_binary(
name = "test_transition_binary",
srcs = ["main.go"],
embed = [":transitions_lib"],
tags = ["manual"],
visibility = ["//visibility:public"],
)
platform_transition_binary(
@ -139,3 +140,10 @@ sh_test(
],
data = [":transitioned_go_binary_arm64"],
)
go_library(
name = "transitions_lib",
srcs = ["main.go"],
importpath = "github.com/aspect-build/bazel-lib/lib/tests/transitions",
visibility = ["//visibility:private"],
)