-
Notifications
You must be signed in to change notification settings - Fork 1.8k
chore: Bump golangci-lint to v2 #2083
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,23 @@ | ||
| # https://golangci-lint.run/usage/configuration/ | ||
| version: "2" | ||
| linters: | ||
| enable: | ||
| - makezero | ||
| - misspell | ||
| exclusions: | ||
| generated: lax | ||
| presets: | ||
| - comments | ||
| - common-false-positives | ||
| - legacy | ||
| - std-error-handling | ||
| paths: | ||
| - third_party$ | ||
| - builtin$ | ||
| - examples$ | ||
| formatters: | ||
| exclusions: | ||
| generated: lax | ||
| paths: | ||
| - third_party$ | ||
| - builtin$ | ||
| - examples$ | ||
|
||
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.
Why remove it? Does new golang-ci-lint v2 include staticcheck?
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.
Yes it's included. https://golangci-lint.run/usage/linters/#enabled-by-default
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.
Just FYI, the
staticchecklinter in Golangci-lint V1 is not the same as the standalone Staticcheck linter. The V1 docs included an additional statement that says (golangci/golangci-lint#2894):This statement has been removed in V2.
In V1,
stylecheck,gosimple,andstaticcheckcover the 4 options of the standalone Staticcheck linter. They have been merged in golangci/golangci-lint#5487, that means thestaticcheckin Golangci-lint V2 now actually works like the standalone Staticcheck linter.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.
thanks for the context!
I think with v2 we should be safe unless I'm missing something?