From 304bdcdbe6b872ba9d68ab93a5dff3c1d43d9026 Mon Sep 17 00:00:00 2001 From: Pascal Bleser Date: Mon, 16 Nov 2026 15:06:32 +0100 Subject: [PATCH] fix(mise): run the pinned golangci-lint in the check:lint task The task looked up the golangci-lint version in .bingo/golangci-lint.mod with the pattern "golangci-lint v", which no longer matches since the module path ends in /v2. The version came out empty, so the task ran "make golangci-lint", which lints the whole tree and never fails (--issues-exit-code 0), and then tried to run a binary named "golangci-lint-", which doesn't exist. Match the require line instead, fail if no version is found, and build only the pinned binary when it is missing. Assisted-by: Claude Code:claude-opus-5-5 --- mise.toml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mise.toml b/mise.toml index 2cc6ebb761..d1043054a2 100644 --- a/mise.toml +++ b/mise.toml @@ -88,8 +88,12 @@ set -e base=$(git rev-parse --abbrev-ref --symbolic-full-name '@{u}' 2>/dev/null || echo origin/main) gobin=$(go env GOBIN) [ -n "$gobin" ] || gobin="$(go env GOPATH)/bin" -bin="$gobin/golangci-lint-$(awk '/golangci-lint v/ {print $3}' .bingo/golangci-lint.mod)" -[ -x "$bin" ] || make -s golangci-lint >/dev/null +# the version pinned by bingo, e.g. "require github.com/golangci/golangci-lint/v2 v2.13.2" +version=$(awk '/^require .*golangci-lint/ {print $3}' .bingo/golangci-lint.mod) +[ -n "$version" ] || { echo "no golangci-lint version in .bingo/golangci-lint.mod" >&2; exit 1; } +bin="$gobin/golangci-lint-$version" +# only build the pinned binary: the golangci-lint make target lints the whole tree +[ -x "$bin" ] || make -s "$bin" >/dev/null exec "$bin" run --modules-download-mode vendor --timeout 15m0s --new-from-merge-base "$base" """