-
Notifications
You must be signed in to change notification settings - Fork 39
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
Changing functionality for AVOID_NULL_CHECK #564
Conversation
### What's done: 1) Now it is not trigered on simple cases like val a = b ==null 2) added logic for requireNotNull
Codecov Report
@@ Coverage Diff @@
## master #564 +/- ##
============================================
- Coverage 81.68% 80.80% -0.89%
- Complexity 1641 1709 +68
============================================
Files 79 87 +8
Lines 4139 4381 +242
Branches 1307 1349 +42
============================================
+ Hits 3381 3540 +159
- Misses 229 298 +69
- Partials 529 543 +14
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
| } | ||
""".trimMargin(), | ||
LintError(2, 14, ruleId, Warnings.AVOID_NULL_CHECKS.warnText() + | ||
" use 'requireNotNull()' instead of myVar != null", false), |
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.
Text can be adjusted a little: like use 'requireNotNull(myVar)' instead of 'require (myVar != null)'
.
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.
getting myVar is too complex logic - I would not like to make the code more complex, but the second part is easy enough, added
### What's done: Review notes
…ature/null-check-#550
### What's done: Review notes
### What's done: Review notes
### What's done: Review notes
### What's done: Review notes
What's done: