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
Fix new lint failures and drop deprecated linters. #1055
Conversation
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.
Looks good overall.
mongo/options/doc.go
Outdated
// not use this file except in compliance with the License. You may obtain | ||
// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
// Package options asdfasdfa. |
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.
You don't seriously mean asdfasdfa, do you?
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.
Haha, good catch. Will update to an actual description 🤦
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.
Looks great thank you!
@@ -20,12 +19,10 @@ linters: | |||
- prealloc | |||
- revive | |||
- staticcheck | |||
- structcheck | |||
- typecheck | |||
- unused |
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.
So deadcode
, structcheck
and varcheck
are now all a subset of unused
?
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.
That's correct. According to the linters documentation, the unused
linter replaces the unmaintained deadcode
, structcheck
and varcheck
linters.
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.
LGTM. Thank you!
The "revive" linter now requires package comments on all packages. Add package comments to all packages commonly used by external users. Ignore package comment warnings on all other packages.
As of
golangci-lint
v1.49.0, the "deadcode", "structcheck", and "varcheck" linters are deprecated (replaced by "unused"), so remove them from the configuration.