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
feat: deprecate varcheck, deadcode, and structcheck #3125
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.
I like this change but curious about the reasoning for modifying default linters not being a breaking change. Breaking default behavior is usually a reason to reject suggestions and push them to v2 (f.e.x modifying or changing exclude use defaults) so this feels a bit inconsistent.
Won't //nolint
directives for non enabled linters yield a warning by nolintlint
?
In fact, Another point, as they are in the default linters, deprecation warnings will appear even if you are not using any configuration. yes |
Yeah I get that the analysis result might be the same but the change can still result in changes that breaks CI or other workflows.
Yup, and this is a great reason to disable them by default if deprecating, if not that would be a pretty bad user experience.
Yeah me neither. Someone running without configuration and Maybe |
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.
Change is good, resonable deprecation. As discussed might introduce breaking changes but I trust your judgment around this change!
The linters have not been updated in 3-6 years and have been deprecated. golangci/golangci-lint#3125
The linters have not been updated in 3-6 years and have been deprecated. golangci/golangci-lint#3125
The linters have not been updated in 3-6 years and have been deprecated. golangci/golangci-lint#3125
The linters have not been updated in 3-6 years and have been deprecated. golangci/golangci-lint#3125
The linters have not been updated in 3-6 years and have been deprecated. golangci/golangci-lint#3125
The linters have not been updated in 3-6 years and have been deprecated. golangci/golangci-lint#3125
The linters have not been updated in 3-6 years and have been deprecated. golangci/golangci-lint#3125
The linters have not been updated in 3-6 years and have been deprecated. golangci/golangci-lint#3125
The linters have not been updated in 3-6 years and have been deprecated. golangci/golangci-lint#3125
|
So the project is abandoned. |
More context about deprecated linters: golangci/golangci-lint#3125
More context about deprecated linters: golangci/golangci-lint#3125
Remove deprecated lints: golangci/golangci-lint#3125 Re-enable gocritic features which previously didn't support generics
* Update golangci-lint version to 1.50.1 Remove deprecated lints: golangci/golangci-lint#3125 Re-enable gocritic features which previously didn't support generics * gofmt * Pass PrevBackupInfo by reference as it is 232 bytes
also, remove them from the default linters.
They can be replaced by
unused
.varcheck
andstructcheck
have not changed for 3 years. https://github.com/opennota/check / https://gitlab.com/opennota/checkdeadcode
have not changed for 6 years. https://github.com/remyoudompheng/go-miscAll those linters are using the deprecated
golang.org/x/tools/go/loader
API that is deprecated for more than 3 years (this API does not have support for Go modules).https://github.com/golang/tools/blob/587a15310bddfc939d37cfaa8be8ea4c3808c3f1/go/loader/doc.go#L10-L11
Fixes #1841
issue related to
structcheck
:Close #1517
Close #826