bazel-lib/tools/format/BUILD.bazel

32 lines
1.1 KiB
Python

load("@aspect_rules_lint//format:defs.bzl", "multi_formatter_binary")
alias(
name = "shfmt",
actual = select({
"@bazel_tools//src/conditions:darwin_arm64": "@shfmt_darwin_aarch64//file:shfmt",
"@bazel_tools//src/conditions:darwin_x86_64": "@shfmt_darwin_x86_64//file:shfmt",
"@bazel_tools//src/conditions:linux_aarch64": "@shfmt_linux_aarch64//file:shfmt",
"@bazel_tools//src/conditions:linux_x86_64": "@shfmt_linux_x86_64//file:shfmt",
}),
visibility = ["//:__subpackages__"],
)
alias(
name = "terraform",
actual = select({
"@bazel_tools//src/conditions:darwin_arm64": "@terraform_macos_aarch64//:terraform",
"@bazel_tools//src/conditions:darwin_x86_64": "@terraform_macos_x86_64//:terraform",
"@bazel_tools//src/conditions:linux": "@terraform_linux_x86_64//:terraform",
}),
visibility = ["//:__subpackages__"],
)
multi_formatter_binary(
name = "format",
go = "@go_sdk//:bin/gofmt",
sh = ":shfmt",
starlark = "@buildifier_prebuilt//:buildifier",
terraform = ":terraform",
visibility = ["//:__subpackages__"],
)