golangci-lint: remove three deprecated linters

golangci-lint is throwing warnings on each run:

   WARN [runner] The linter 'xxxxx' is deprecated (since v1.49.0)
      due to: The owner seems to have abandoned the linter.
      Replaced by unused.

...for xxxxx in deadcode, structcheck, varcheck. Add those three
to the deprecated-linter list, and remove any exceptions from
the code base.

Signed-off-by: Ed Santiago <santiago@redhat.com>
This commit is contained in:
Ed Santiago
2022-12-05 12:51:51 -07:00
parent 6f1bc98dce
commit 59118b42b1
5 changed files with 7 additions and 4 deletions

View File

@ -62,6 +62,9 @@ linters:
- golint # replaced by revive - golint # replaced by revive
- scopelint # replaced by exportloopref - scopelint # replaced by exportloopref
- interfacer - interfacer
- deadcode # deprecated since v1.49.0, replaced by unused
- structcheck # deprecated since v1.49.0, replaced by unused
- varcheck # deprecated since v1.49.0, replaced by unused
linters-settings: linters-settings:
errcheck: errcheck:
check-blank: false check-blank: false

View File

@ -1,4 +1,4 @@
//nolint:deadcode,unused // these types are used to wire generated swagger to API code //nolint:unused // these types are used to wire generated swagger to API code
package swagger package swagger
import ( import (

View File

@ -1,4 +1,4 @@
//nolint:deadcode,unused // these types are used to wire generated swagger to API code //nolint:unused // these types are used to wire generated swagger to API code
package swagger package swagger
import ( import (

View File

@ -1,4 +1,4 @@
//nolint:deadcode,unused // these types are used to wire generated swagger to API code //nolint:unused // these types are used to wire generated swagger to API code
package swagger package swagger
import ( import (

View File

@ -27,7 +27,7 @@ type initMachine struct {
memory *uint memory *uint
now bool now bool
timezone string timezone string
rootful bool //nolint:unused,structcheck rootful bool //nolint:unused
volumes []string volumes []string
cmd []string cmd []string