Skip to content

chore: update Makefile ensure_golangci-lint - #1072

Merged
mbevc1 merged 2 commits into
mainfrom
20260803_go_lint
Aug 4, 2026
Merged

chore: update Makefile ensure_golangci-lint#1072
mbevc1 merged 2 commits into
mainfrom
20260803_go_lint

Conversation

@mbevc1

@mbevc1mbevc1 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Update Makefile ensure Go linting and make it more robust across platforms and environments. It might fail on non-brew ENVs.

Checklist

@mbevc1mbevc1 added the fix label Aug 3, 2026
@claude

claudeBot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Claude finished @mbevc1's task in 51s —— View job


Review: ensure_golangci-lint robustness

Thanks for hardening this target — it directly resolves the earlier concern about brew upgrade golangci-lint failing on a fresh macOS where the formula was never installed. The new flow is a clear improvement. ✅

What's good

  • Handles the not-yet-installed casebrew ls --versions golangci-lint gates upgrade vs install, so a fresh Homebrew user no longer hits Error: golangci-lint not installed.
  • Graceful non-brew fallback — Linux/CI and other non-brew environments now degrade cleanly instead of failing on a missing brew.
  • Helpful failure path — when nothing is available, it prints an actionable go install command and exits non-zero (rather than silently continuing into a broken lint).
  • Version consistencyGOTOOLCHAIN=go$(GO_VERSION) is derived from go.mod (go 1.26.5), and the /v2/ install path matches .golangci.yml (version: "2") and the CI golangci-lint-action@v9. All aligned. 👍

Minor / optional

  • The elif command -v golangci-lint branch uses whatever binary is on PATH without checking it's a v2 build. A contributor with an old golangci-lint v1 on PATH would pass this check but then fail in lint with a config-version error. Not blocking — just a sharp edge you could smooth later (e.g. golangci-lint version sanity check) if it ever bites.

No compile/test impact — this is Makefile-only. Nice, focused change.


  • Read PR diff vs origin/main
  • Review robustness of ensure_golangci-lint
  • Post review
    · branch 20260803_go_lint

Comment threadMakefile Outdated
@mbevc1
mbevc1 enabled auto-merge (squash) August 3, 2026 10:19
@mbevc1mbevc1 added the dependencies Pull requests that update a dependency file label Aug 3, 2026
@mbevc1
mbevc1 merged commit 2686632 into mainAug 4, 2026
20 checks passed
@mbevc1
mbevc1 deleted the 20260803_go_lint branch August 4, 2026 08:57
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependenciesPull requests that update a dependency filefix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@mbevc1@dangrondahl