Skip to content
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

Merged
merged 2 commits into from Aug 29, 2022

Conversation

matthewdale
Copy link
Collaborator

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.

Copy link
Collaborator

@qingyang-hu qingyang-hu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall.

// 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.
Copy link
Collaborator

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?

Copy link
Collaborator Author

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 🤦

Copy link
Contributor

@benjirewis benjirewis left a 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
Copy link
Contributor

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?

Copy link
Collaborator Author

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.

Copy link
Collaborator

@qingyang-hu qingyang-hu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants