-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Deprecate varcheck, structcheck, and deadcode #1841
Comments
This is great, I found a lot of similarity/redundancy between deedcode and un-used personally, sometimes it's with Can you explain a little bit more about This actually reminds me of one idea I had in mind long time back. It's about the minimum requirements of new linters in golangci-lint. Currently, there is no requirement for new one (e.g. supporting suggested, extra info, auto fix, etc), and some might be pretty small in scope, which is already available or can be added easily in one of other existing linter. This is not directly related to this github issue though. |
lol. I did litteraly said that on the article review yesterday, and here is the results from last week (made the same comparison).
|
These lead to false positives when build tags disable certain files as reported in #1545 They'll get deprecated and removed eventually anyway: golangci/golangci-lint#1841 Signed-off-by: Johannes 'fish' Ziemke <[email protected]>
These lead to false positives when build tags disable certain files as reported in #1545 They'll get deprecated and removed eventually anyway: golangci/golangci-lint#1841 Signed-off-by: Johannes 'fish' Ziemke <[email protected]>
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Is |
no, |
That's pretty confusing toi have a category named as the binary. Thx for the clarification, I thought declaring staticcheck within my configuration wrapped the 4 categories. That's was not obvious when you discover golangci |
Do we have any updates on this? Seems like folks are keeping |
re: changes to linters... - deadcode, structcheck and varcheck are duplicated by unused, which also performs better (golangci/golangci-lint#1841)
`golangci-lint` [deprecated](golangci/golangci-lint#1841) a bunch of linters, removed them.
Some golanci-lint default tests are deprecated because unmantained. This update disables them: - `varcheck` - `structcheck` - `deadcode` Ref: golangci/golangci-lint#1841
Some golanci-lint default tests are deprecated because unmantained. This update disables them: - `varcheck` - `structcheck` - `deadcode` Ref: golangci/golangci-lint#1841
Misc upgrades for tooling Update linting rules as per golangci/golangci-lint#1841 Closes splunk#207
Linters varcheck and deadcode were deprecated since v1.49.0 because the owners have abandoned them. Both are replaced with unused, see details here golangci/golangci-lint#1841
* [chore] Remove deprecated linters Linters varcheck and deadcode were deprecated since v1.49.0 because the owners have abandoned them. Both are replaced with unused, see details here golangci/golangci-lint#1841
These lead to false positives when build tags disable certain files as reported in prometheus#1545 They'll get deprecated and removed eventually anyway: golangci/golangci-lint#1841 Signed-off-by: Johannes 'fish' Ziemke <[email protected]>
These lead to false positives when build tags disable certain files as reported in prometheus#1545 They'll get deprecated and removed eventually anyway: golangci/golangci-lint#1841 Signed-off-by: Johannes 'fish' Ziemke <[email protected]>
The `deadcode`, `varcheck` and `structcheck` linters are all subsets of `unused` (which is enabled by default`) cf: golangci/golangci-lint#1841
Is your feature request related to a problem?
Currently, by default golangci-lint runs the following linters about unused/dead code:
deadcode
structcheck
unused
(staticcheck
)varcheck
Those linters, activated by default, are all the linters related to unused/dead code detection.
https://golangci-lint.run/usage/linters/
I created a small sandbox to find the scope of each of these linters.
deadcode
structcheck
varcheck
unused
deadcode
structcheck
varcheck
unused
Describe the solution you'd like
varcheck
,structcheck
, anddeadcode
.varcheck
,structcheck
, anddeadcode
from the default lintersDescribe alternatives you've considered
varcheck
,structcheck
, anddeadcode
.or
varcheck
,structcheck
, anddeadcode
from the default lintersAdditional context
varcheck
andstructcheck
varcheck
andstructcheck
come from https://github.com/opennota/check.https://github.com/opennota/check has moved to https://gitlab.com/opennota/check.
And currently, we use a fork https://github.com/golangci/check
The 2 linters are based on the old
golang.org/x/tools/go/loader
deadcode
deadcode
is also a fork https://github.com/golangci/go-miscIt is based on the old
golang.org/x/tools/go/loader
The text was updated successfully, but these errors were encountered: