-
Notifications
You must be signed in to change notification settings - Fork 5.1k
feat: Add Error Handling Linters #22669
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: main
Are you sure you want to change the base?
Conversation
Signed-off-by: bupd <bupdprasanth@gmail.com>
Signed-off-by: bupd <bupdprasanth@gmail.com>
78d24ae to
2ee8005
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #22669 +/- ##
===========================================
+ Coverage 45.36% 68.52% +23.15%
===========================================
Files 244 821 +577
Lines 13333 101859 +88526
Branches 2719 0 -2719
===========================================
+ Hits 6049 69802 +63753
- Misses 6983 28174 +21191
- Partials 301 3883 +3582
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
eb65c12 to
704e8d0
Compare
Signed-off-by: bupd <bupdprasanth@gmail.com>
704e8d0 to
a19c17c
Compare
|
I see you are adding tens of "// nolint:nilnil", so is it really needed? |
Yeah, it's not a best practice to return nil, nil And currently we are having this and the problem is, when I change it creates differences in the entire logic of how this handled in some cascading into more and more changes. Just added nolint for the already present, in hopes of preventing this kind of antipatterns. Any new additions will fail the linter. |
Comprehensive Summary of your change
Add error handling linters to catch common bugs:
nilerr- Catches returning nil when error is not nilnilnil- Catches returning (nil, nil) in (value, error) functions//nolintcomments for intentional patterns with justificationIssue being fixed
Fixes #22665
Fixes #22666
Please indicate you've done the following: