Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix golangci-lint #438

Closed
sheurich opened this issue Feb 23, 2024 · 3 comments
Closed

Fix golangci-lint #438

sheurich opened this issue Feb 23, 2024 · 3 comments

Comments

@sheurich
Copy link
Contributor

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
@sheurich
Copy link
Contributor Author

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

@sheurich
Copy link
Contributor Author

Proposed fix in #439

mcpherrinm pushed a commit that referenced this issue Feb 27, 2024
This PR addresses #438 by
fixing all of the reported issues in Pebble code.

fixes include:
- A fix for a WFE panic: [Use built-in UTC for TZ to eliminate
panics](2ee3d6b)
- Fixes for Appveyor and Travis related to Python
- Update golanci-lint to current in Travis
@sheurich
Copy link
Contributor Author

Solved by #439

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant