-
-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: bring in aspect_rules_lint and add format task to Aspect Workf…
…lows (#1390)
- Loading branch information
1 parent
014b409
commit 69fe0d9
Showing
6 changed files
with
103 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
"""BUILD definition for the formatter binary | ||
This is in its own package because it has so many loading-time symbols, | ||
we don't want to trigger eager fetches of these for builds that don't want to run format. | ||
""" | ||
|
||
load("@aspect_rules_lint//format:defs.bzl", "multi_formatter_binary") | ||
|
||
package(default_visibility = ["//:__subpackages__"]) | ||
|
||
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", | ||
}), | ||
) | ||
|
||
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", | ||
}), | ||
) | ||
|
||
multi_formatter_binary( | ||
name = "format", | ||
go = "@go_sdk//:bin/gofmt", | ||
sh = ":shfmt", | ||
starlark = "@buildifier_prebuilt//:buildifier", | ||
terraform = ":terraform", | ||
) |