-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Enable errcheck
linter
#4462
Enable errcheck
linter
#4462
Conversation
055b90d
to
36bb25a
Compare
Codecov Report
@@ Coverage Diff @@
## main #4462 +/- ##
=======================================
Coverage 90.70% 90.71%
=======================================
Files 178 178
Lines 10357 10367 +10
=======================================
+ Hits 9394 9404 +10
Misses 745 745
Partials 218 218
Continue to review full report at Codecov.
|
config/configmap.go
Outdated
// Ignore error for now; it only fails with strict merge when the types are different | ||
_ = l.k.Merge(merged) |
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.
should Koanf decide to return an error for a different reason we would have no way to report the Set
failed, so maybe we should return the error here instead?
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.
seems there's at least a couple of calls that could trigger an error in this func with Load
just above this line, I would be in favour of returning an error from Set
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.
Opened #4467 for this, I want to keep this PR for non-breaking changes
@@ -138,7 +137,7 @@ issues: | |||
# The list of ids of default excludes to include or disable. By default it's empty. | |||
# See the list of default excludes here https://golangci-lint.run/usage/configuration. | |||
include: | |||
- EXC0001 | |||
# - EXC0001 - errcheck checks that are not usually checked |
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.
We discussed this on #2881 (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.
Thanks for doing this, it looks good to me. Will review and approve once a decision on what to do w/ the errors from Set
is made.
config/configmap.go
Outdated
// Ignore error for now; it only fails with strict merge when the types are different | ||
_ = l.k.Merge(merged) |
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.
seems there's at least a couple of calls that could trigger an error in this func with Load
just above this line, I would be in favour of returning an error from Set
Description:
Enable
errcheck
and fix linter errors.Link to tracking Issue: Updates #2789