Skip to content

Fix make tools installing golangci-lint v1 against a v2 config - #1

Closed
martinlaws wants to merge 1 commit into
mainfrom
fix/golangci-v2-tools
Closed

Fix make tools installing golangci-lint v1 against a v2 config#1
martinlaws wants to merge 1 commit into
mainfrom
fix/golangci-v2-tools

Conversation

@martinlaws

@martinlaws martinlaws commented Jul 30, 2026

Copy link
Copy Markdown
Owner

make tools installs golangci-lint from the v1 module path:

go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest

.golangci.yml is version: "2", so make lint fails immediately after a clean make tools:

Error: you are using a configuration file for golangci-lint v2 with
golangci-lint v1: please use golangci-lint v2
make: *** [lint] Error 3

The v2 module path fixes it.

CI does not catch this because it never runs make toolsci.yml and test.yml both use golangci-lint-action pinned to v2.10.1, and .mise.toml pins only Go. So it only surfaces for someone setting up locally by following CONTRIBUTING.md, which is also the person least equipped to diagnose it.

One thing you may want on top: CI pins v2.10.1 while this line is @latest, which currently resolves to 2.12.2, so local lint can be stricter than CI. Happy to pin the Makefile to match if you would prefer — I left it @latest to match the other installs in the target.

`make tools` installed from the v1 module path while .golangci.yml is
version: "2", so `make lint` fails immediately after a clean setup:

    Error: you are using a configuration file for golangci-lint v2
    with golangci-lint v1: please use golangci-lint v2
    make: *** [lint] Error 3

CI does not catch this because it never runs `make tools` — ci.yml and
test.yml both use golangci-lint-action pinned to v2.10.1. The break
only surfaces for someone setting up locally from CONTRIBUTING.md.
@martinlaws

Copy link
Copy Markdown
Owner Author

Superseded — this shipped upstream as basecamp#150. Closing the fork copy.

@martinlaws martinlaws closed this Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant