-
Notifications
You must be signed in to change notification settings - Fork 0
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
Changes from all commits
19c64e5
da92d3e
773c112
7b431f4
8fd1c2d
ee211ed
daba0b9
d207d5b
13088c2
8ca6b22
a288963
2f30096
9d44a90
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
name: Publish Release | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,6 @@ run: | |
linters: | ||
enable: | ||
- bodyclose | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. deadcode,structcheck,varcheck are unmaintained/deprecated There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed |
||
- deadcode | ||
- depguard | ||
- dupl | ||
- errcheck | ||
- gochecknoglobals | ||
|
@@ -24,18 +22,14 @@ linters: | |
- megacheck | ||
- misspell | ||
- nakedret | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nolintlint works fine with go1.22 |
||
#- nolintlint | ||
# nolintlint is currently disabled because some linters don't yet work with Go 1.18, but we may have nolint | ||
# directives that would be needed to suppress those linters if they did work. | ||
- nolintlint | ||
- prealloc | ||
- staticcheck | ||
- structcheck | ||
- stylecheck | ||
- typecheck | ||
- unconvert | ||
- unparam | ||
- unused | ||
- varcheck | ||
- whitespace | ||
fast: false | ||
|
||
|
@@ -44,7 +38,7 @@ linters-settings: | |
simplify: false | ||
goimports: | ||
local-prefixes: gopkg.in/launchdarkly,github.com/launchdarkly | ||
|
||
issues: | ||
exclude-use-default: false | ||
max-same-issues: 1000 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (gofmt) |
||
// like this: | ||
// | ||
// for _, contexts := range data.NewContextFactoriesForSingleAndMultiKind("NameOfTest") { | ||
// t.Run(contexts.Description(), func(t *testing.T) { | ||
// context := contexts.NextUniqueContext() // do something with this | ||
// }) | ||
// } | ||
// for _, contexts := range data.NewContextFactoriesForSingleAndMultiKind("NameOfTest") { | ||
// t.Run(contexts.Description(), func(t *testing.T) { | ||
// context := contexts.NextUniqueContext() // do something with this | ||
// }) | ||
// } | ||
func NewContextFactoriesForSingleAndMultiKind( | ||
prefix string, builderActions ...func(*ldcontext.Builder), | ||
) []*ContextFactory { | ||
|
@@ -130,11 +130,11 @@ func NewContextFactoriesForSingleAndMultiKind( | |
// Each will have an appropriate Description, so the logic for running a test against each one can look | ||
// like this: | ||
// | ||
// for _, contexts := range data.NewContextFactoriesForExercisingAllAttributes("NameOfTest") { | ||
// t.Run(contexts.Description(), func(t *testing.T) { | ||
// context := contexts.NextUniqueContext() // do something with this | ||
// }) | ||
// } | ||
// for _, contexts := range data.NewContextFactoriesForExercisingAllAttributes("NameOfTest") { | ||
// t.Run(contexts.Description(), func(t *testing.T) { | ||
// context := contexts.NextUniqueContext() // do something with this | ||
// }) | ||
// } | ||
func NewContextFactoriesForExercisingAllAttributes( | ||
prefix string, | ||
) []*ContextFactory { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// Package helpers contains various utilities for writing tests. | ||
package helpers |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed. |
||
basicEvaluateFlagWithOldUser(t, client, flagKey, user, defaultValue) | ||
verifyResult(t) | ||
}) | ||
} | ||
|
@@ -263,7 +263,7 @@ func (c CommonEventTests) EventContexts(t *ldtest.T) { | |
if c.isClientSide { | ||
client.SendIdentifyEventWithOldUser(t, user) | ||
} | ||
_ = basicEvaluateFlagWithOldUser(t, client, debuggedFlagKey, user, defaultValue) | ||
basicEvaluateFlagWithOldUser(t, client, debuggedFlagKey, user, defaultValue) | ||
client.FlushEvents(t) | ||
payload := events.ExpectAnalyticsEvents(t, defaultEventTimeout) | ||
eventMatchers := []m.Matcher{debugEventMatcher, IsSummaryEvent()} | ||
|
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.
Sneaking this in; without it it shows the full workflow file name in the UI.