Skip to content

Conversation

@alarso16
Copy link
Contributor

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

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]>
@alarso16 alarso16 marked this pull request as ready for review November 25, 2025 21:16
@alarso16 alarso16 requested a review from a team as a code owner November 25, 2025 21:16
@JonathanOppenheimer JonathanOppenheimer changed the title style: enable errcheck linter sync: coreth PR #1203: style: enable errcheck linter Dec 1, 2025
for i := range nodes {
node := tmpnet.NewNode()
node.EnsureKeys()
_ = node.EnsureKeys()
Copy link
Member

@JonathanOppenheimer JonathanOppenheimer Dec 1, 2025

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)

Comment on lines +181 to +182
_, _ = rand.Read(key)
_, _ = rand.Read(value)
Copy link
Member

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)

Copy link
Member

@JonathanOppenheimer JonathanOppenheimer left a 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.

Copy link
Collaborator

@ceyonur ceyonur left a 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

Comment on lines +2722 to +2724
defer func() {
require.NoError(t, vm.Shutdown(t.Context()))
}()
Copy link
Collaborator

Choose a reason for hiding this comment

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

t.Cleanup?

Comment on lines +3538 to +3540
defer func() {
require.NoError(t, vm.Shutdown(ctx))
}()
Copy link
Collaborator

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants