diff --git a/MODULE.bazel b/MODULE.bazel index 92c6b57e1..c10dadb89 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -46,7 +46,7 @@ use_repo(bazel_lib_toolchains, "bsd_tar_toolchains") ####### Dev dependencies ######## -bazel_dep(name = "aspect_rules_lint", version = "0.12.0", dev_dependency = True) +bazel_dep(name = "aspect_rules_lint", version = "1.0.2", dev_dependency = True) bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.7.1", dev_dependency = True) bazel_dep(name = "buildifier_prebuilt", version = "7.3.1", dev_dependency = True) bazel_dep(name = "gazelle", version = "0.39.1", dev_dependency = True, repo_name = "bazel_gazelle") diff --git a/WORKSPACE b/WORKSPACE index d0d11dcd1..d84475cd0 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -216,10 +216,20 @@ buildifier_prebuilt_register_toolchains() # rules_lint load( "@aspect_rules_lint//format:repositories.bzl", - "fetch_shfmt", + "rules_lint_dependencies", ) -fetch_shfmt() +rules_lint_dependencies() + +load("@rules_multitool//multitool:multitool.bzl", "multitool") + +multitool( + name = "multitool", + lockfiles = [ + "@aspect_rules_lint//format:multitool.lock.json", + "@aspect_rules_lint//lint:multitool.lock.json", + ], +) load("@com_grail_bazel_toolchain//toolchain:deps.bzl", "bazel_toolchain_dependencies") diff --git a/WORKSPACE.bzlmod b/WORKSPACE.bzlmod index 7f3aa2280..5e0001cde 100644 --- a/WORKSPACE.bzlmod +++ b/WORKSPACE.bzlmod @@ -1,11 +1,3 @@ -# rules_lint -load( - "@aspect_rules_lint//format:repositories.bzl", - "fetch_shfmt", -) - -fetch_shfmt() - # dev dependency load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") diff --git a/js/private/dev_deps.bzl b/js/private/dev_deps.bzl index d0a830db5..d20d20bc5 100644 --- a/js/private/dev_deps.bzl +++ b/js/private/dev_deps.bzl @@ -48,9 +48,9 @@ def rules_js_dev_dependencies(): http_archive( name = "aspect_rules_lint", - sha256 = "1e679b081750ca9cedad4f79e371ee5e14d9a157de8018661af9fe45879100b2", - strip_prefix = "rules_lint-0.21.0", - url = "https://github.com/aspect-build/rules_lint/releases/download/v0.21.0/rules_lint-v0.21.0.tar.gz", + sha256 = "7d5feef9ad85f0ba78cc5757a9478f8fa99c58a8cabc1660d610b291dc242e9b", + strip_prefix = "rules_lint-1.0.2", + url = "https://github.com/aspect-build/rules_lint/releases/download/v1.0.2/rules_lint-v1.0.2.tar.gz", ) http_archive( diff --git a/tools/BUILD.bazel b/tools/BUILD.bazel index a3f5555c8..ebcc49578 100644 --- a/tools/BUILD.bazel +++ b/tools/BUILD.bazel @@ -3,23 +3,12 @@ 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") +load("@aspect_rules_lint//format:defs.bzl", "format_multirun") 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", - "//conditions:default": ":noop", - }), -) - -multi_formatter_binary( +format_multirun( name = "format", - sh = ":shfmt", + shell = "@aspect_rules_lint//format:shfmt", starlark = "@buildifier_prebuilt//:buildifier", )