Skip to content

Fix golangci-lint #438

@sheurich

Description

@sheurich

The current golangci-lint configuration includes a number of deprecated lints:

WARN [runner] The linter 'exhaustivestruct' is deprecated (since v1.46.0) due to: The owner seems to have abandoned the linter. Replaced by exhaustruct. 
WARN [runner] The linter 'structcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused. 
WARN [runner] The linter 'interfacer' is deprecated (since v1.38.0) due to: The repository of the linter has been archived by the owner.  
WARN [runner] The linter 'golint' is deprecated (since v1.41.0) due to: The repository of the linter has been archived by the owner. Replaced by revive. 
WARN [runner] The linter 'ifshort' is deprecated (since v1.48.0) due to: The repository of the linter has been deprecated by the owner.  
WARN [runner] The linter 'varcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused. 
WARN [runner] The linter 'deadcode' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused. 
WARN [runner] The linter 'nosnakecase' is deprecated (since v1.48.1) due to: The repository of the linter has been deprecated by the owner. Replaced by revive(var-naming). 

and lints which are not usable in the current setup:

cmd/pebble-challtestsrv/mockdns.go:17: File is not `gci`-ed with --skip-generated -s standard -s default (gci)
…
cmd/pebble-challtestsrv/httpone.go:10: File is not `gofmt`-ed with `-s` (gofmt)

The current number of reported issues is also quite high:

283 issues:
* contextcheck: 2
* cyclop: 12
* dupword: 3
* durationcheck: 2
* errorlint: 3
* exhaustivestruct: 50
* exhaustruct: 2
* gci: 12
* goconst: 1
* goerr113: 33
* gofmt: 1
* gofumpt: 47
* goimports: 1
* gosimple: 4
* ifshort: 2
* musttag: 6
* nestif: 3
* nilerr: 1
* noctx: 1
* perfsprint: 18
* revive: 21
* staticcheck: 4
* tagliatelle: 2
* testpackage: 1
* usestdlibvars: 1
* varnamelen: 50

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions