-
Notifications
You must be signed in to change notification settings - Fork 38
chore: Upgrades golangci-lint to v2 #1327
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
Conversation
hwSpecJSON, err := json.Marshal(hardwareSpec) | ||
require.NoError(t, err) | ||
assert.Equal(t, tc.expected, string(hwSpecJSON)) | ||
assert.JSONEq(t, tc.expected, string(hwSpecJSON)) |
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.
fixes: encoded-compare: use assert.JSONEq (testifylint)
hwSpec := config.GetElectableSpecs() | ||
a.Equal(nodeCount, hwSpec.GetNodeCount()) | ||
} | ||
if i == 0 { |
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.
fixes: QF1003: could use tagged switch on i (staticcheck)
} | ||
|
||
func integrationToModel(currentModel Model, integration *admin.ThridPartyIntegration) Model { | ||
enabled := false |
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.
fixes: QF1007: could merge conditional assignment into variable declaration (staticcheck)
if currentModel.Enabled != nil { | ||
enabled = true | ||
} | ||
enabled := currentModel.Enabled != nil |
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.
This can never be false
?
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.
can be false if currentModel.Enabled == nil
Proposed changes
Upgrades golangci-lint to v2 using the migration guide, follow example in: mongodb/openapi#616
Jira ticket: CLOUDP-#
Please include a summary of the fix/feature/change, including any relevant motivation and context.
Link to any related issue(s):
Type of change:
expected)
Manual QA performed:
Required Checklist:
make fmt
and formatted my codeworks in Atlas
Further comments