Skip to content

chore: upgrade to golangci-lint 1.52.2 #7674

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

Merged
merged 2 commits into from
May 25, 2023
Merged

Conversation

spikecurtis
Copy link
Contributor

golangci-lint 1.52 is out, and it upgrades gocritic, which has dropped the ioutilDeprecated checker. This is because since go 1.19 all the functions in that package are directly marked deprecated, so normal go tooling will pick up on it and the checker is redundant.

This PR updates us to latest release of golangci-lint, which was annoying me because my local dev environment has the new version and it complains about this checker being missing.

Signed-off-by: Spike Curtis <spike@coder.com>
Signed-off-by: Spike Curtis <spike@coder.com>
@spikecurtis spikecurtis requested a review from a team May 25, 2023 06:07
Copy link
Member

@mtojek mtojek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is golangci-lint provided via nix shell aligned with this version bump?

@matifali
Copy link
Member

Is golangci-lint provided via nix shell aligned with this version bump?

I tried using nix-shell in the context of #4854 but could not get a usable development environment. We need to update our nix-shell setup. Also, we should create an automated way to align all development environments.

  1. Nix shell
  2. .devcontainer .devcontainer in coder/coder doesn't create a working dev environment.  #7591
  3. dogfood template dogfood: use same/similar environment for .devcontainer and dogfood template. #5211

@spikecurtis
Copy link
Contributor Author

Is golangci-lint provided via nix shell aligned with this version bump?

Nix stuff doesn't appear to have versions pinned at all. So whatever the answer is today, it might not be true tomorrow.

@mtojek mtojek requested review from mtojek May 25, 2023 08:20
Copy link
Member

@mtojek mtojek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing blocking in this PR, so 👍

Nix stuff doesn't appear to have versions pinned at all. So whatever the answer is today, it might not be true tomorrow.

That is correct, but maybe we can check if there is a PR waiting in the nix repo to merge the new version of golangci-lint. Most likely other tools are not aligned too, so maybe we just need to drop support for nix if it's always broken (by design).

@spikecurtis spikecurtis merged commit 96a2e63 into main May 25, 2023
@spikecurtis spikecurtis deleted the spike/ioutilDeprecated branch May 25, 2023 10:56
@github-actions github-actions bot locked and limited conversation to collaborators May 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants