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(deps): build with Go 1.22 #191

Merged
merged 13 commits into from
Feb 21, 2024
Merged

fix(deps): build with Go 1.22 #191

merged 13 commits into from
Feb 21, 2024

Conversation

cwaldren-ld
Copy link
Contributor

@cwaldren-ld cwaldren-ld commented Feb 21, 2024

This PR builds sdk-test-harness with Go 1.22, up from Go 1.18. With this change, we can pull in a new golanglintci version.

This surfaced a bunch of new lints, which I've fixed.

@@ -1,3 +1,5 @@
name: Publish Release

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sneaking this in; without it it shows the full workflow file name in the UI.

@@ -5,8 +5,6 @@ run:
linters:
enable:
- bodyclose
Copy link
Contributor Author

@cwaldren-ld cwaldren-ld Feb 21, 2024

Choose a reason for hiding this comment

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

deadcode,structcheck,varcheck are unmaintained/deprecated

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed depguard because I don't know why we were using it (and it wasn't configured.) The purpose is to restrict the module from importing certain packages; we don't have such a policy for this tool as far as I know.

@@ -24,18 +22,14 @@ linters:
- megacheck
- misspell
- nakedret
Copy link
Contributor Author

Choose a reason for hiding this comment

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

nolintlint works fine with go1.22

@@ -100,11 +100,11 @@ func (f *ContextFactory) SetKeyDisambiguatorValueSameAs(f1 *ContextFactory) {
// Each will have an appropriate Description, so the logic for running a test against each one can look
Copy link
Contributor Author

Choose a reason for hiding this comment

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

(gofmt)

@cwaldren-ld cwaldren-ld marked this pull request as ready for review February 21, 2024 19:48
@@ -227,7 +227,7 @@ func (c CommonEventTests) EventContexts(t *ldtest.T) {

if user := representContextAsOldUser(t, context); user != nil {
t.Run("with old user", func(t *ldtest.T) {
_ = basicEvaluateFlagWithOldUser(t, client, flagKey, user, defaultValue)
Copy link
Member

Choose a reason for hiding this comment

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

Not related to this change, but this is some non-intuitive data flow.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed.

@cwaldren-ld cwaldren-ld merged commit 4159378 into v2 Feb 21, 2024
3 of 4 checks passed
@cwaldren-ld cwaldren-ld deleted the cw/go1.22-and-linters branch February 21, 2024 22:01
@cwaldren-ld cwaldren-ld changed the title fix(deps): upgrade to Go to 1.22 and fix new lints fix(deps): upgrade to Go to 1.22 Feb 21, 2024
@cwaldren-ld cwaldren-ld changed the title fix(deps): upgrade to Go to 1.22 fix(deps): build with Go 1.22 Feb 21, 2024
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.

2 participants