-
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
Bugfix/new lines rule dot qualified expression and safe access expression #1337
Conversation
* corrected logic fix and warn String Template in Linelength rule * added logic fix and warn long Dot Qualified Expression in LineLength rule * added logic fix and warn Value Arguments List in LineLength rule * added and corrected fix and warn tests in LineLength rule * fix code with diktat:fix@diktat * added comments to classes and functions * correct code with running detect ### Issue (#1243)
* corrected logic fix and warn long Dot Qualified Expression ### Issue (#865)
* corrected logic fix and warn long Dot Qualified Expression and Safe Access Expression ### Issue (#865)
* corrected logic fix and warn long Dot Qualified Expression and Safe Access Expression ### Issue (#865)
* corrected logic fix and warn long Dot Qualified Expression and Safe Access Expression ### Issue (#865)
* corrected logic fix and warn long Dot Qualified Expression and Safe Access Expression and Postfix Expression ### Issue (#865)
* corrected logic fix and warn long Dot Qualified Expression and Safe Access Expression and Postfix Expression ### Issue (#865)
rewrite code ### Issue (#865)
* corrected logic fix and warn long Dot Qualified Expression and Safe Access Expression and Postfix Expression * added fix test in NewLineRuleFixTest * corrected and added warnings in NewLineRuleWarnTest ### Issue (#865)
* corrected logic fix and warn long Dot Qualified Expression and Safe Access Expression and Postfix Expression * added fix test in NewLineRuleFixTest * corrected and added warnings in NewLineRuleWarnTest * run diktat:fix@diktat ### Issue (#865)
* corrected logic fix and warn long Dot Qualified Expression and Safe Access Expression and Postfix Expression * added fix test in NewLineRuleFixTest * corrected and added warnings in NewLineRuleWarnTest * run diktat:fix@diktat ### Issue (#865)
* corrected logic fix and warn String Template in LineLength rule * added logic fix and warn long Dot Qualified Expression and Safe Access Expression in LineLength rule * added logic fix and warn Value Arguments List in LineLength rule * added and corrected fix and warn tests in LineLength rule * corrected code and KDoc in method appendNewlineMergingWhiteSpace in AstNodeUtils.kt * fix code with diktat:fix@diktat * added comments to classes and functions * correct code with running detect ### Issue (#1243)
Codecov Report
@@ Coverage Diff @@
## master #1337 +/- ##
============================================
+ Coverage 83.59% 83.64% +0.04%
- Complexity 2567 2588 +21
============================================
Files 106 106
Lines 7291 7386 +95
Branches 2018 2048 +30
============================================
+ Hits 6095 6178 +83
Misses 353 353
- Partials 843 855 +12
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
* corrected logic fix and warn long Dot Qualified Expression and Safe Access Expression and Postfix Expression * added fix test in NewLineRuleFixTest * corrected and added warnings in NewLineRuleWarnTest * run diktat:fix@diktat ### Issue (#865)
* corrected logic fix and warn String Template in LineLength rule * added logic fix and warn long Dot Qualified Expression and Safe Access Expression in LineLength rule * added logic fix and warn Value Arguments List in LineLength rule * added and corrected fix and warn tests in LineLength rule * fix code with diktat:fix@diktat * added comments to classes and functions * correct code with running detect ### Issue (#1243)
* corrected logic fix and warn long Dot Qualified Expression and Safe Access Expression and Postfix Expression * added fix test in NewLineRuleFixTest * corrected and added warnings in NewLineRuleWarnTest * run diktat:fix@diktat ### Issue (#865)
* corrected logic fix and warn long Dot Qualified Expression and Safe Access Expression and Postfix Expression * added fix test in NewLineRuleFixTest * corrected and added warnings in NewLineRuleWarnTest * run diktat:fix@diktat ### Issue (#865)
### Whats added: * corrected logic fix and warn long Dot Qualified Expression and Safe Access Expression and Postfix Expression * added fix test in NewLineRuleFixTest * corrected and added warnings in NewLineRuleWarnTest * run diktat:fix@diktat ### Issue (#865)
### Whats added: * corrected logic fix and warn long Dot Qualified Expression and Safe Access Expression and Postfix Expression * added fix test in NewLineRuleFixTest * corrected and added warnings in NewLineRuleWarnTest * run diktat:fix@diktat ### Issue (#865)
### Whats added: * corrected logic fix and warn long Dot Qualified Expression and Safe Access Expression and Postfix Expression * added fix test in NewLineRuleFixTest * corrected and added warnings in NewLineRuleWarnTest * run diktat:fix@diktat ### Issue (#865)
### Whats added: * corrected logic fix and warn long Dot Qualified Expression and Safe Access Expression and Postfix Expression * added fix test in NewLineRuleFixTest * corrected and added warnings in NewLineRuleWarnTest * run diktat:fix@diktat ### Issue (#865)
### Whats added: * corrected logic fix and warn long Dot Qualified Expression and Safe Access Expression and Postfix Expression * added fix test in NewLineRuleFixTest * corrected and added warnings in NewLineRuleWarnTest * run diktat:fix@diktat ### Issue (#865)
### Whats added: * corrected logic fix and warn long Dot Qualified Expression and Safe Access Expression and Postfix Expression * added fix test in NewLineRuleFixTest * corrected and added warnings in NewLineRuleWarnTest * run diktat:fix@diktat ### Issue (#865)
diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/NewlinesRule.kt
Outdated
Show resolved
Hide resolved
diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/NewlinesRule.kt
Outdated
Show resolved
Hide resolved
### Whats added: * corrected logic fix and warn long Dot Qualified Expression and Safe Access Expression and Postfix Expression * added fix test in NewLineRuleFixTest * corrected and added warnings in NewLineRuleWarnTest * run diktat:fix@diktat ### Issue (#865)
diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/NewlinesRule.kt
Fixed
Show fixed
Hide fixed
### Whats added: * corrected logic fix and warn long Dot Qualified Expression and Safe Access Expression and Postfix Expression * added fix test in NewLineRuleFixTest * corrected and added warnings in NewLineRuleWarnTest * run diktat:fix@diktat ### Issue (#865)
import org.cqfn.diktat.ruleset.utils.isGradleScript | ||
import org.cqfn.diktat.ruleset.utils.isSingleLineIfElse | ||
import org.cqfn.diktat.ruleset.utils.leaveOnlyOneNewLine | ||
import org.cqfn.diktat.ruleset.utils.* |
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.
Now, when we have an editor config - we should prohibit wildcard imports
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.
please enable it in diktat-analysis
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.
it's in the excludes, sorry, no need to change
@@ -135,11 +122,68 @@ class NewlinesRule(configRules: List<RulesConfig>) : DiktatRule( | |||
BLOCK -> handleLambdaBody(node) | |||
RETURN -> handleReturnStatement(node) | |||
SUPER_TYPE_LIST, VALUE_PARAMETER_LIST, VALUE_ARGUMENT_LIST -> handleList(node) | |||
DOT_QUALIFIED_EXPRESSION, SAFE_ACCESS_EXPRESSION, POSTFIX_EXPRESSION -> handDotQualifiedAndSafeAccessExpression(node) |
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.
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.
please check the following logic and add a test:
val value = decodeValue()
.
toString()
### Whats added: * corrected logic fix and warn long Dot Qualified Expression and Safe Access Expression and Postfix Expression * commented on the choice of different logics with these expressions * added fix test in NewLineRuleFixTest * corrected and added warnings in NewLineRuleWarnTest * run diktat:fix@diktat ### Issue (#865)
diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/NewlinesRule.kt
Fixed
Show fixed
Hide fixed
### Whats added: * corrected logic fix and warn long Dot Qualified Expression and Safe Access Expression and Postfix Expression * commented on the choice of different logics with these expressions * added fix test in NewLineRuleFixTest * corrected and added warnings in NewLineRuleWarnTest * run diktat:fix@diktat ### Issue (#865)
…xpression' into bugfix/NewLinesRuleDotQualifiedExpression
### Whats added: * corrected logic fix and warn long Dot Qualified Expression and Safe Access Expression and Postfix Expression * commented on the choice of different logics with these expressions * added fix test in NewLineRuleFixTest * corrected and added warnings in NewLineRuleWarnTest * run diktat:fix@diktat ### Issue (#865)
This pull request close #865
Actions checklist
Issue ( #865)