Skip to content

Fix golangci-lint #438

Closed
Closed

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

Activity

  1. sheurich commented on Feb 23, 2024

    @sheurich
    ContributorAuthor

    Switching to the default golangci-lint configuration seems to be a good first step to fixing the above concerns.

  2. sheurich commented on Feb 24, 2024

    @sheurich
    ContributorAuthor

    Proposed fix in #439

  3. added a commit that references this issue on Feb 27, 2024
  4. sheurich commented on Feb 27, 2024

    @sheurich
    ContributorAuthor

    Solved by #439

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions