2
0
Fork 0
mirror of https://github.com/bazel-contrib/bazel-lib synced 2024-12-01 07:15:24 +00:00
bazel-lib/tools/format/BUILD.bazel
2024-05-13 23:51:10 -07:00

28 lines
842 B
Python

load("@aspect_rules_lint//format:defs.bzl", "multi_formatter_binary")
sh_binary(
name = "noop",
srcs = ["noop.sh"],
)
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",
"//conditions:default": ":noop",
}),
visibility = ["//:__subpackages__"],
)
multi_formatter_binary(
name = "format",
go = "@go_sdk//:bin/gofmt",
sh = ":shfmt",
starlark = "@buildifier_prebuilt//:buildifier",
tags = ["manual"],
visibility = ["//:__subpackages__"],
)