lint: upgrade golangci-lint configuration#1275
Merged
Conversation
Collaborator
Author
|
This change is part of the following stack: Change managed by git-spice. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1275 +/- ##
=======================================
Coverage 98.64% 98.64%
=======================================
Files 35 35
Lines 3458 3458
=======================================
Hits 3411 3411
Misses 40 40
Partials 7 7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Merged
rabbbit
approved these changes
Sep 13, 2025
| - unused | ||
|
|
||
| # Our own extras: | ||
| - gofumpt |
|
|
||
| // Unexported fields are left unchanged. | ||
| assert.NotEqual(t, "foo", out.type4.foo) | ||
| assert.NotEqual(t, "foo", out.foo) |
Collaborator
Author
There was a problem hiding this comment.
similar—yeah. it was a quickfix—not a breaking linter warning, but a linter message nonetheless.
type4 is embedded so the field can be accessed directly.
| YEAR_RANGE: '\d{4}(-\d{4})?' | ||
| template: |- | ||
| Copyright (c) {{ YEAR_RANGE }} {{ COMPANY }} | ||
| settings: |
There was a problem hiding this comment.
Github UI seems to be unnecessarily painful for this change:|
r-hang
approved these changes
Sep 14, 2025
golangci-lint now has a v2 configuration format that includes specifying formatters as well. Migrate the configuration with `golangci-lint migrate` and manually copy the comments over. Also take advantage of the `-diff` flag of `go mod tidy` instead of `git diff` after the fact.
This version auto-manages the cache so we don't have to do it ourselves.
928124b to
fa4441d
Compare
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.
golangci-lint now has a v2 configuration format
that includes specifying formatters as well.
Migrate the configuration with
golangci-lint migrateand manually copy the comments over.
Also take advantage of the
-diffflag ofgo mod tidyinstead of
git diffafter the fact.