Fix make tools installing golangci-lint v1 against a v2 config - #1
Closed
martinlaws wants to merge 1 commit into
Closed
Fix make tools installing golangci-lint v1 against a v2 config#1martinlaws wants to merge 1 commit into
make tools installing golangci-lint v1 against a v2 config#1martinlaws wants to merge 1 commit into
Conversation
`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.
Owner
Author
|
Superseded — this shipped upstream as basecamp#150. Closing the fork copy. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
make toolsinstalls golangci-lint from the v1 module path:.golangci.ymlisversion: "2", somake lintfails immediately after a cleanmake tools:The v2 module path fixes it.
CI does not catch this because it never runs
make tools—ci.ymlandtest.ymlboth usegolangci-lint-actionpinned tov2.10.1, and.mise.tomlpins only Go. So it only surfaces for someone setting up locally by followingCONTRIBUTING.md, which is also the person least equipped to diagnose it.One thing you may want on top: CI pins
v2.10.1while this line is@latest, which currently resolves to2.12.2, so local lint can be stricter than CI. Happy to pin the Makefile to match if you would prefer — I left it@latestto match the other installs in the target.