build: replace deprecated linters deadcode, structcheck and varcheckadd with unused

The three linters deadcode, structcheck and varcheck we have been using are as of
gitlabci-lint version 1.49.0 (24 Aug 2022) marked as deprecated, and replaced by unused.

The linters staticcheck, gosimple, stylecheck and unused should combined correspond to
the checks performed by the stand-alone staticcheck tool, which is by default used for
linting in Visual Studio Code with the Go extension. We previously enabled the first
three, but skipped unused due to many reported issues.

See #6387 for more information.
This commit is contained in:
albertony 2022-08-28 12:12:17 +02:00
parent 254c6ef1dd
commit d6b46e41dd

View File

@ -2,19 +2,16 @@
linters: linters:
enable: enable:
- deadcode
- errcheck - errcheck
- goimports - goimports
- revive - revive
- ineffassign - ineffassign
- structcheck
- varcheck
- govet - govet
- unconvert - unconvert
- staticcheck - staticcheck
- gosimple - gosimple
- stylecheck - stylecheck
#- unused - unused
#- prealloc #- prealloc
#- maligned #- maligned
disable-all: true disable-all: true