Commit e7a7637
authored
fix(make): install golangci-lint via v2 module path so make lint works (#600)
## Summary
`Makefile`'s lint, lint-fix, and dev-setup targets pinned
`github.com/golangci/golangci-lint/cmd/golangci-lint@latest` — the
**v1** module path. Since the v2 release, `@latest` from this path
resolves to the last v1.x tag (v1.64.8). The project's `.golangci.yml`
uses `version: "2"`, so v1 errors out with:
> Error: you are using a configuration file for golangci-lint v2 with
golangci-lint v1: please use golangci-lint v2
CI was unaffected because `netresearch/.github`'s `go-check` workflow
installs golangci-lint via a path that already targets v2. Only `make
lint` was broken locally.
Surfaced by [a review comment on
#597](#597).
## Changes
- `Makefile:57,64,211` — three install lines now pin
`github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest`.
- `.envrc:59` — `check_tool` install hint mirrors the v2 path so users
seeing the "missing" message install the correct version.
## Verification
```
$ rm -rf build/.tools && make lint
golangci-lint has version 2.12.1 built with go1.26.2 …
0 issues.
```
Matches the v2.12.1 that CI runs (`netresearch/.github`'s go-check
installs via `go: downloading github.com/golangci/golangci-lint/v2
v2.12.1` per the workflow logs).
## Test plan
- [x] `make lint` from clean state installs v2 and runs cleanly
- [x] Commit signed off (DCO)
- [ ] CI green2 files changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
211 | | - | |
| 211 | + | |
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
| |||
0 commit comments