Skip to content

Disable deprecated linters - structcheck, deadcode, varcheck, ifshort #7115

@killianmuldoon

Description

@killianmuldoon

The following linters are deprecated in golangci-lint but we're still using them in our config:

  • structcheck - Finds unused struct fields
  • deadcode - Finds unused code
  • varcheck - Finds unused global variables and constants
  • ifshort - Go linter that checks if your code uses short syntax for if-statements whenever possible.

We should remove these linters at some point as they're no longer mantained, but is there a strong reason to keep any of them around?

I think ifshort is low-impact and is currently buggy (gives different results on my machine for some reason). The others - deadcode, varcheck, and struct check can all be replaced by unused

Metadata

Metadata

Labels

kind/cleanupCategorizes issue or PR as related to cleaning up code, process, or technical debt.triage/acceptedIndicates an issue or PR is ready to be actively worked on.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions