-
-
Notifications
You must be signed in to change notification settings - Fork 759
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
Fix PreferToOverPairSyntax exception #3046
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3046 +/- ##
=========================================
Coverage 79.31% 79.31%
Complexity 2562 2562
=========================================
Files 432 432
Lines 7725 7725
Branches 1466 1466
=========================================
Hits 6127 6127
Misses 814 814
Partials 784 784
Continue to review full report at Codecov.
|
|
||
report(CodeSmell(issue, Entity.from(expression), | ||
message = "Pair is created by using the pair constructor. " + | ||
"This can replaced by `$firstArg to $secondArg`")) | ||
"This can replaced by `$arg`")) |
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.
Could we add a test for this case? And assert the output too.
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.
I'm currently waiting for the OP to provide more information and the code, which causes this issue.
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 take a look at the linked issue. I couldn't reproduce the exception with the available information.
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.
I'm also not sure how to test this case. Should we just go on and merge this and later add a testcase if the reporter responds?
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.
Yes, I suggest to do that.
Incorporates feedback from #3046
Addresses feedback from #3046
Closes #3044
This leads to a crash if the valueArguments list contains only 1 item.