From 98476291823ad4ae535c60c2c0845368e18096ba Mon Sep 17 00:00:00 2001 From: Mark Lee Date: Fri, 21 Nov 2025 17:18:54 -0800 Subject: [PATCH 1/5] chore: update mise.lock --- mise.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mise.lock b/mise.lock index 53be2e246..6966c71ee 100644 --- a/mise.lock +++ b/mise.lock @@ -1,4 +1,4 @@ -[tools.bats] +[[tools.bats]] version = "1.12.0" backend = "aqua:bats-core/bats-core" @@ -7,10 +7,10 @@ checksum = "blake3:836a0963444ede10131984991c0f92219c84418b57c242b4ff5bc80d83daa size = 175914 url = "https://github.com/bats-core/bats-core/archive/refs/tags/v1.12.0.tar.gz" -[tools.circleci] +[[tools.circleci]] version = "0.1.32638" backend = "aqua:CircleCI-Public/circleci-cli" -[tools."npm:prettier"] +[[tools."npm:prettier"]] version = "2.8.8" backend = "npm:prettier" From 0cd4bbecb450fedcf66d7d3ad35449120e84d977 Mon Sep 17 00:00:00 2001 From: Mark Lee Date: Fri, 21 Nov 2025 17:19:52 -0800 Subject: [PATCH 2/5] fix(linters): use mise to call buf format --- shell/linters.sh | 6 ++++-- shell/linters/protobuf.sh | 17 +++++++++-------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/shell/linters.sh b/shell/linters.sh index ceb1420b5..4684f2fab 100755 --- a/shell/linters.sh +++ b/shell/linters.sh @@ -5,10 +5,12 @@ set -e -o pipefail DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" -# shellcheck source=./lib/logging.sh -source "$DIR/lib/logging.sh" # shellcheck source=./lib/bootstrap.sh source "$DIR/lib/bootstrap.sh" +# shellcheck source=./lib/logging.sh +source "$DIR/lib/logging.sh" +# shellcheck source=./lib/mise.sh +source "$DIR/lib/mise.sh" # shellcheck source=./lib/shell.sh source "$DIR/lib/shell.sh" diff --git a/shell/linters/protobuf.sh b/shell/linters/protobuf.sh index 18269be88..501783c25 100644 --- a/shell/linters/protobuf.sh +++ b/shell/linters/protobuf.sh @@ -5,18 +5,19 @@ # shellcheck disable=SC2034 extensions=(proto) +# Runs buf [...] on all versioned .proto files. +run_buf() { + local mise_bin + mise_bin="$(find_mise)" + find_files_with_extensions "${extensions[@]}" | xargs -n1 "$mise_bin" exec buf@"$(get_tool_version buf)" "$@" +} + buf_linter() { - # Why: We're OK with this. - # shellcheck disable=SC2155 - local PROTOFMT=$("$DIR/gobin.sh" -p github.com/bufbuild/buf/cmd/buf@v"$(get_tool_version "buf")") - find_files_with_extensions "${extensions[@]}" | xargs -n1 "$PROTOFMT" format --exit-code --diff + run_buf format --exit-code --diff } buf_formatter() { - # Why: We're OK with this. - # shellcheck disable=SC2155 - local PROTOFMT=$("$DIR/gobin.sh" -p github.com/bufbuild/buf/cmd/buf@v"$(get_tool_version "buf")") - find_files_with_extensions "${extensions[@]}" | xargs -n1 "$PROTOFMT" format -w + run_buf format -w } linter() { From 561366aa9188c7a8c1d4633807ed3ec529224f85 Mon Sep 17 00:00:00 2001 From: Mark Lee Date: Fri, 21 Nov 2025 17:26:16 -0800 Subject: [PATCH 3/5] Fix syntax --- shell/linters/protobuf.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/linters/protobuf.sh b/shell/linters/protobuf.sh index 501783c25..fa765c551 100644 --- a/shell/linters/protobuf.sh +++ b/shell/linters/protobuf.sh @@ -9,7 +9,7 @@ extensions=(proto) run_buf() { local mise_bin mise_bin="$(find_mise)" - find_files_with_extensions "${extensions[@]}" | xargs -n1 "$mise_bin" exec buf@"$(get_tool_version buf)" "$@" + find_files_with_extensions "${extensions[@]}" | xargs -n1 "$mise_bin" exec buf@"$(get_tool_version buf)" -- buf "$@" } buf_linter() { From 66ae2beafbabba99d7f814847efdcbba772c3c70 Mon Sep 17 00:00:00 2001 From: Mark Lee Date: Mon, 24 Nov 2025 08:36:40 -0800 Subject: [PATCH 4/5] Add mise to fmt.sh too --- shell/fmt.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/shell/fmt.sh b/shell/fmt.sh index 35381c67d..268dd9f1f 100755 --- a/shell/fmt.sh +++ b/shell/fmt.sh @@ -6,10 +6,12 @@ set -e -o pipefail DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" -# shellcheck source=./lib/logging.sh -source "$DIR/lib/logging.sh" # shellcheck source=./lib/bootstrap.sh source "$DIR/lib/bootstrap.sh" +# shellcheck source=./lib/logging.sh +source "$DIR/lib/logging.sh" +# shellcheck source=./lib/mise.sh +source "$DIR/lib/mise.sh" # shellcheck source=./lib/shell.sh source "$DIR/lib/shell.sh" From 5b009fd4f97ead2043f3cde8512e724724b7aa0b Mon Sep 17 00:00:00 2001 From: Mark Lee Date: Mon, 24 Nov 2025 08:44:53 -0800 Subject: [PATCH 5/5] Use long flag --- shell/linters/protobuf.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/linters/protobuf.sh b/shell/linters/protobuf.sh index fa765c551..9a1d00aef 100644 --- a/shell/linters/protobuf.sh +++ b/shell/linters/protobuf.sh @@ -17,7 +17,7 @@ buf_linter() { } buf_formatter() { - run_buf format -w + run_buf format --write } linter() {