diff --git a/.devcontainer/post_create_command.sh b/.devcontainer/post_create_command.sh index 8415894..4185353 100755 --- a/.devcontainer/post_create_command.sh +++ b/.devcontainer/post_create_command.sh @@ -18,7 +18,7 @@ npm install -g @devcontainers/cli SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)" REPOSITORY_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd -P)" -sudo "${REPOSITORY_ROOT}/tools/tool_installer.py" install shellcheck yamlfmt apm +sudo "${REPOSITORY_ROOT}/tools/tool_installer.py" install bazelisk shellcheck yamlfmt pre-commit install diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9a33895..e8016e2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,6 +25,16 @@ repos: exclude: ^MODULE\.bazel\.lock$ - repo: local hooks: + - id: bzlmod-tidy + name: bazel mod tidy + entry: bazelisk mod tidy + language: system + pass_filenames: false + - id: bzlmod-lockfile + name: bazel mod deps lockfile check + entry: bazelisk mod deps --lockfile_mode=error + language: system + pass_filenames: false - id: yamlfmt name: yamlfmt entry: tools/run_tool.sh yamlfmt diff --git a/MODULE.bazel b/MODULE.bazel index fce91a3..fe3a8b9 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -16,7 +16,6 @@ module(name = "score_devcontainer") bazel_dep(name = "rules_multitool", version = "1.11.1") multitool = use_extension("@rules_multitool//multitool:extension.bzl", "multitool") - multitool.hub(lockfile = "//tools:lockfiles/actionlint.lock.json") multitool.hub(lockfile = "//tools:lockfiles/ruff.lock.json") multitool.hub(lockfile = "//tools:lockfiles/shellcheck.lock.json") @@ -27,7 +26,6 @@ multitool.hub(lockfile = "//tools:lockfiles/starpls.lock.json") multitool.hub(lockfile = "//tools:lockfiles/bazelisk.lock.json") multitool.hub(lockfile = "//tools:lockfiles/apm.lock.json") multitool.hub(lockfile = "//tools:lockfiles/opencode.lock.json") - use_repo(multitool, "multitool") register_toolchains("@multitool//toolchains:all")