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

Update linter config #442

Merged
merged 8 commits into from
Nov 6, 2024
Merged

Update linter config #442

merged 8 commits into from
Nov 6, 2024

Conversation

richvdh
Copy link
Member

@richvdh richvdh commented Nov 5, 2024

A bunch of changes to get the linter (and CI in general) passing again.

Review commit-by-commit for details of the changes.

`ioutil` is deprecated, and on all the versions of Go we support, its
functionality is replaced with `io`.
If the error message returned by the server contained a `%` character, `Errorf`
would attempt to interpolate it, causing a panic.
The `deadcode`, `varcheck` and `structcheck` linters are all subsets of
`unused` (which is enabled by default`)

cf: golangci/golangci-lint#1841
These are replaced with `govet`, which is enabled by default.
`maligned` is apparently replaced with `govet fieldalignment`, but
enabling that produces a million errors so I haven't done that.

`golint` is apparently close to `revive`, but again that produces lots
of warnings.

`interface` apparently made bad suggestions and is removed without
replacement.
Dendrite no longer builds against go 1.20, since
matrix-org/dendrite#3360
@richvdh richvdh requested a review from a team November 5, 2024 13:21
@codecov-commenter
Copy link

codecov-commenter commented Nov 6, 2024

Codecov Report

Attention: Patch coverage is 33.33333% with 4 lines in your changes missing coverage. Please review.

Project coverage is 59.89%. Comparing base (be8877e) to head (8a5752e).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
spec/matrixerror.go 0.00% 2 Missing ⚠️
fclient/client.go 50.00% 1 Missing ⚠️
fclient/request.go 50.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #442   +/-   ##
=======================================
  Coverage   59.89%   59.89%           
=======================================
  Files          51       51           
  Lines        7154     7154           
=======================================
  Hits         4285     4285           
  Misses       2477     2477           
  Partials      392      392           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@richvdh richvdh merged commit 6c4c6f7 into main Nov 6, 2024
4 checks passed
@richvdh richvdh deleted the rav/fix_lint branch November 6, 2024 18:25
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

Successfully merging this pull request may close these issues.

3 participants