-
Notifications
You must be signed in to change notification settings - Fork 328
lint: upgrade golangci-lint configuration #1275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
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:
|
| - unused | ||
|
|
||
| # Our own extras: | ||
| - gofumpt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accidental? On purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see it's added below
|
|
||
| // Unexported fields are left unchanged. | ||
| assert.NotEqual(t, "foo", out.type4.foo) | ||
| assert.NotEqual(t, "foo", out.foo) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this related to the linter change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Github UI seems to be unnecessarily painful for this change:|
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
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.