Repository navigation
ci: pin the lint rules and the linter version - #35
Merged
Merged
Conversation
The lint job ran golangci-lint at latest with no config, so its defaults decided the gate and its defaults move. A linter release turned main red on a commit nobody touched, which is how a gate stops being read. The rules are written down now, with the upstream exclusions for writes to stdout and Close on a file that was only read, and the version is pinned. Three real findings are fixed rather than excluded: the four struct literals that are conversions, reflect.Ptr for reflect.Pointer, and parser.ParseDir, which is deprecated for ignoring build tags.
5 of 7 tasks
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.
The lint job ran golangci-lint at
latestwith no config file, so its defaults were the gate and its defaults move. A linter release turned main red on a commit nobody touched..golangci.ymlwrites the rules down: the standard linter set, plus the upstreamstd-error-handlingexclusions for writes to stdout and stderr,Closeon a file that was only read, andFlushon a tabwriter about to be discarded. The alternative was_, _ =in front of 121 print calls.reflect.Ptrforreflect.Pointer, andparser.ParseDir, deprecated since Go 1.25 for ignoring build tags, replaced with a ReadDir and ParseFile walk.Homebrew and Scoop needed no change: both already self-disable when their token is unset, and the v0.3.0 release run confirms it with "brew.skip_upload is set" and "scoop.skip_upload is true" while the release itself went green.
golangci-lint run ./...reports 0 issues, and gofmt, vet and the full test run are clean.