-
Notifications
You must be signed in to change notification settings - Fork 494
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
lint: enable nilerr linter and fix errors #5361
Conversation
@@ -92,5 +92,5 @@ func generateKeysForRange(ctx context.Context, startIdx uint64, endIdx uint64, k | |||
} | |||
keys[k] = *sigAlgo | |||
} | |||
return nil | |||
return nil //nolint:nilerr // OK to not return ctx.Err() |
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.
@algoidan does this look fine?
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.
Yes. (Also played with it a bit)
maybe for clarity, we can change line 87:
return nil // we don't need to return the ctx error, since the other goroutine will report it.
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.
OK I will push that change.. thanks!
Codecov Report
@@ Coverage Diff @@
## master #5361 +/- ##
==========================================
+ Coverage 55.28% 55.29% +0.01%
==========================================
Files 454 454
Lines 63772 63772
==========================================
+ Hits 35254 35263 +9
+ Misses 26115 26107 -8
+ Partials 2403 2402 -1
... and 15 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Summary
This enables the nilerr linter that checks for cases like this:
Test Plan
Existing tests and new linter runs should pass.