-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Upgrade to latest Go, golangci-lint #408
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This also requires upgrading golangci-lint. Just a moment. |
Go 1.19 is not supported anymore. Upgrade to the latest release of Go 1.22.
They're now issues.exclude-files and exclude-dirs.
The linter is overly sensitive to numbers in source code including file permissioning bits like 0700.
depguard v2 expects configuration to be supplied differently.
These linters have been deprecated and deactivated. They can be removed from the list now. ``` WARN [lintersdb] The linter "maligned" is deprecated (step 2) and deactivated. It should be removed from the list of disabled linters. https://golangci-lint.run/product/roadmap/#linter-deprecation-cycle WARN [lintersdb] The linter "interfacer" is deprecated (step 2) and deactivated. It should be removed from the list of disabled linters. https://golangci-lint.run/product/roadmap/#linter-deprecation-cycle WARN [lintersdb] The linter "scopelint" is deprecated (step 2) and deactivated. It should be removed from the list of disabled linters. https://golangci-lint.run/product/roadmap/#linter-deprecation-cycle WARN [lintersdb] The linter "exhaustivestruct" is deprecated (step 2) and deactivated. It should be removed from the list of disabled linters. https://golangci-lint.run/product/roadmap/#linter-deprecation-cycle WARN [lintersdb] The linter "ifshort" is deprecated (step 2) and deactivated. It should be removed from the list of disabled linters. https://golangci-lint.run/product/roadmap/#linter-deprecation-cycle WARN [lintersdb] The linter "nosnakecase" is deprecated (step 2) and deactivated. It should be removed from the list of disabled linters. [..] ```
``` WARN [config_reader] The configuration option `linters.govet.check-shadowing` is deprecated. Please enable `shadow` instead, if you are not using `enable-all`. ``` Now the 'shadow' linter serves this purpose. With enable-all, it's already enabled.
Unused parameters act as valid documentation. Replacing them with "_" is undesirable.
``` manifest/manifesttest/pkgbuilder.go:53:1: Duplicate words (the) found (dupword) util/filepatcher.go:39:2: assigned to result, but reassigned without using the value (wastedassign) state/state.go:319:2: assigned to actualDigest, but reassigned without using the value (wastedassign) ```
``` ui/ui.go:189:10: fmt.Sprintf can be replaced with string concatenation (perfsprint) ui/ui.go:197:10: fmt.Sprintf can be replaced with string concatenation (perfsprint) envars/ops.go:303:42: fmt.Sprintf can be replaced with string concatenation (perfsprint) manifest/actions.go:34:58: fmt.Sprintf can be replaced with string concatenation (perfsprint) manifest/actions.go:63:10: fmt.Sprintf can be replaced with string concatenation (perfsprint) manifest/actions.go:65:9: fmt.Sprintf can be replaced with string concatenation (perfsprint) ```
We could add struct tags to it, but I'm gonna say that's out of scope for this PR.
It's deprecated and replaced with 'err113', and Hermit doesn't appear to be failing that.
This is ready for eyes now |
alecthomas
approved these changes
Jun 21, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies for the delay, LGTM!
alecthomas
approved these changes
Jun 21, 2024
Not a problem! Thanks for merging. |
spicykay
pushed a commit
to spicykay/hermit
that referenced
this pull request
Aug 23, 2024
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Go 1.19 is not supported anymore.
It won't receive security updates or bugfixes.
Upgrade to the latest release of Go 1.22,
and the latest golangci-lint to actually run with the new Go.
This required a number of linter fixups, or configuration adjustments.
These are detailed in individual commits in the PR.
I tried to make reasonable choices on those issues case-by-case.
I did not bump the 'go' directive in go.mod for now.