-
Notifications
You must be signed in to change notification settings - Fork 278
sync: coreth PR #1203: style: enable errcheck linter #1876
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Jonathan Oppenheimer <[email protected]> Signed-off-by: Jonathan Oppenheimer <[email protected]> Co-authored-by: Austin Larson <[email protected]> Co-authored-by: Stephen Buttolph <[email protected]>
| for i := range nodes { | ||
| node := tmpnet.NewNode() | ||
| node.EnsureKeys() | ||
| _ = node.EnsureKeys() |
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 you add a comment why this is safe? (similar to core/fifo_cache.go)
| _, _ = rand.Read(key) | ||
| _, _ = rand.Read(value) |
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 you add a comment why this is safe? (similar to core/fifo_cache.go)
JonathanOppenheimer
left a comment
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 compared this side by side to the coreth PR -- all looks good to me. I left two comments just to understand why we can ignore a couple of the errors.
ceyonur
left a comment
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.
overall lgtm just two places can be used with t.Cleanup
| defer func() { | ||
| require.NoError(t, vm.Shutdown(t.Context())) | ||
| }() |
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.
t.Cleanup?
| defer func() { | ||
| require.NoError(t, vm.Shutdown(ctx)) | ||
| }() |
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.
again should this be t.Cleanup?
Why this should be merged
Adds a required linter for avalanchego merge.
How this works
"Cherry-picks" ava-labs/coreth#1203. There were a lot of conflicts though, so most of it was done by hand
How this was tested
CI
Need to be documented?
No
Need to update RELEASES.md?
No