-
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(#748) #749
Conversation
### What's done: * Fixed bug
Codecov Report
@@ Coverage Diff @@
## master #749 +/- ##
============================================
+ Coverage 79.80% 80.53% +0.73%
- Complexity 2035 2044 +9
============================================
Files 97 97
Lines 5106 5298 +192
Branches 1633 1638 +5
============================================
+ Hits 4075 4267 +192
Misses 247 247
Partials 784 784
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 bug
@@ -305,9 +308,15 @@ class NewlinesRule(configRules: List<RulesConfig>) : DiktatRule("newlines", conf | |||
return | |||
} | |||
|
|||
if (node.elementType == VALUE_ARGUMENT_LIST && !node.hasParent(SUPER_TYPE_LIST)) { | |||
// check that it is not listOf(1,2,3...) |
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.
// check that it is not listOf(1,2,3...) | |
// check that it is not function invocation, but only supertype constructor calls |
// check that it is not listOf(1,2,3...) | |
// check that it is not listOf(1,2,3...) |
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.
Fixed
@@ -342,6 +352,25 @@ class NewlinesRule(configRules: List<RulesConfig>) : DiktatRule("newlines", conf | |||
} | |||
} | |||
|
|||
private fun handleFirstValueArgument(node: ASTNode) = 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.
It can be merged with handleFirstValueParameter
with a couple of additional arguments
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.
Merged
### What's done: * Fixed bugs
### What's done: * Fixed bugs
# Conflicts: # diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter2/kdoc/CommentsFormatting.kt
### 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: * 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: * Fixed bugs
### What's done: * Fixed bugs
### What's done: * Fixed bugs
### What's done: * Fixed bugs
### What's done: * Fixed bugs
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.
@petertrr Please, rereview. There was a bug with function calls and it's arguments. Added tests on it. The change is in NewLinesRule file.
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.
@petertrr Please, rereview.
OK, lgtm
### What's done: * Fixed bug
Fixed bug mentioned in linked issue
This pull request closes #748