-
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
Feature. Auto-fixes for null-checks #681
Conversation
### What's done: * Added fix tests * Added fix logic
Codecov Report
@@ Coverage Diff @@
## master #681 +/- ##
============================================
- Coverage 80.00% 79.99% -0.01%
- Complexity 1824 1835 +11
============================================
Files 87 87
Lines 4735 4769 +34
Branches 1527 1540 +13
============================================
+ Hits 3788 3815 +27
+ Misses 239 238 -1
- Partials 708 716 +8
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
### What's done: * Fixed bugs
diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/NullChecksRule.kt
Outdated
Show resolved
Hide resolved
diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/NullChecksRule.kt
Show resolved
Hide resolved
diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/NullChecksRule.kt
Outdated
Show resolved
Hide resolved
diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/NullChecksRule.kt
Outdated
Show resolved
Hide resolved
diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/NullChecksRule.kt
Outdated
Show resolved
Hide resolved
### What's done: * Fixed bugs
"use 'requireNotNull' instead of require(${condition.text})" | ||
) { | ||
// todo implement fixer | ||
val variableName = binaryExprNode.firstChildNode.text |
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.
Will firstChildNode always be the needed one here? Maybe, psi.getLeft()
will be more reliable?
### What's done: * Fixed bugs
### What's done: * Fixed bugs
### What's done: * Fixed bugs
### What's done: * Fixed bugs
### What's done: * Fixed bugs
What's done:
This pull request closes #538