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

golangci-lint bump to 1.49.0 along with required resolutions #382

Merged
merged 2 commits into from
Aug 26, 2022

Conversation

kensipe
Copy link
Member

@kensipe kensipe commented Aug 26, 2022

Bump linter to 1.49.0

  • resolutions use of deprecated functions
  • removal of 3 linters which were abandoned
  • gofmt formatting fixed for use of * in godoc

Signed-off-by: Ken Sipe kensipe@gmail.com

Signed-off-by: Ken Sipe <kensipe@gmail.com>
Signed-off-by: Ken Sipe <kensipe@gmail.com>
Copy link
Collaborator

@iblancasa iblancasa left a comment

Choose a reason for hiding this comment

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

Just a minor comment we can address as part of another PR

- stylecheck
- unconvert
- unparam
- unused
- varcheck
run:
go: '1.17'
Copy link
Collaborator

Choose a reason for hiding this comment

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

I know is not part of this PR but, should this be modified?

Suggested change
go: '1.17'
go: '1.18'

Copy link
Member Author

Choose a reason for hiding this comment

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

@iblancasa the project went to go 1.18 early. In those early days many of the linters broke. there were negative consequences of running as 1.18 (as well as some for running as 1.17). Running as 1.17 made the most sense at the time... but it is definitely worth revisiting that now. thanks for calling it out! I will review now to see the consequences.

Copy link
Member Author

Choose a reason for hiding this comment

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

switching to running 1.18 linters results in the following disable linters. I'm surprised this is still the case.

WARN [linters context] gosimple is disabled because of go1.18. You can track the evolution of the go1.18 support by following the https://github.com/golangci/golangci-lint/issues/2649.
WARN [linters context] staticcheck is disabled because of go1.18. You can track the evolution of the go1.18 support by following the https://github.com/golangci/golangci-lint/issues/2649.
WARN [linters context] structcheck is disabled because of go1.18. You can track the evolution of the go1.18 support by following the https://github.com/golangci/golangci-lint/issues/2649.
WARN [linters context] stylecheck is disabled because of go1.18. You can track the evolution of the go1.18 support by following the https://github.com/golangci/golangci-lint/issues/2649.
WARN [linters context] unparam is disabled because of go1.18. You can track the evolution of the go1.18 support by following the https://github.com/golangci/golangci-lint/issues/2649.
WARN [linters context] unused is disabled because of go1.18. You can track the evolution of the go1.18 support by following the https://github.com/golangci/golangci-lint/issues/2649.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Interesting. I think we can leave it there.

Thanks!

Copy link
Member Author

Choose a reason for hiding this comment

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

@iblancasa the logic behind stay with go1.17 running of linters is we can't write and have 1.18 style code linted (so no generics) but we get all the 1.17 linting.

@kensipe kensipe merged commit 63f81f8 into main Aug 26, 2022
@kensipe kensipe deleted the ken/lint-bump branch August 26, 2022 14:11
iblancasa pushed a commit to iblancasa/kuttl that referenced this pull request Nov 17, 2022
…lder#382)

* golangci-lint bump to 1.49.0 along with required resolutions
* Replaced deprecated call in APIServer testenv

Signed-off-by: Ken Sipe <kensipe@gmail.com>
Signed-off-by: Israel Blancas <iblancasa@gmail.com>
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.

None yet

2 participants