-
Notifications
You must be signed in to change notification settings - Fork 220
Go vet and staticcheck with gov1.20.5 #2792
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
fa45a36
to
3e0398d
Compare
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.
I'll leave it up to the pipeline to yell if this royally upset something, but overall seems great. Thank you for these improvements :)
pkg/cache/cache_test.go
Outdated
for name, test := range tests { | ||
test := test |
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.
for name, test := range tests { | |
test := test | |
for name, tc := range tests { | |
tc := tc |
Minor nit so this is similar with other tests
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 has been updated on the latest push.
pkg/porter/list_test.go
Outdated
require.NoError(t, err, "ReadInstallation failed") | ||
|
||
di := NewDisplayInstallation(i) | ||
di := NewDisplayInstallation(install) |
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.
di := NewDisplayInstallation(install) | |
displayinstall := NewDisplayInstallation(install) |
I feel like if we make i
less ambiguous we should follow the same with di
- but open to just leaving it because it is nbd
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 has been updated on the latest push.
/azp run porter-integration |
Azure Pipelines successfully started running 1 pipeline(s). |
3e0398d
to
3dc065b
Compare
adjusted test to run all instead of the last one in the list Signed-off-by: Troy Connor <troy0820@users.noreply.github.com>
3dc065b
to
367913c
Compare
/azp run porter-integration |
Commenter does not have sufficient privileges for PR 2792 in repo getporter/porter |
What does this change
Using gov1.20.5, performing
go vet ./...
andstaticcheck ./...
produces a number of errors that need to be fixed. This PR fixes them and adjusts the test to not only run the last value in the iteration of tests but maximizes thet.Parallel()
withgo test -v -race ./...
go vet:
staticcheck:
What issue does it fix
Closes #2727
Notes for the reviewer
Put any questions or notes for the reviewer here.
Checklist
go vet ./...
and thestaticcheck
results. The adjustments came to optimize what we need fromt.Parallel()
so we don't just test the last value in the test cases.Reviewer Checklist