-
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. False-positive LOCAL_VARIABLE_EARLY_DECLARATION #535
Bugfix. False-positive LOCAL_VARIABLE_EARLY_DECLARATION #535
Conversation
### What's done: * Fixed bugs
Codecov Report
@@ Coverage Diff @@
## master #535 +/- ##
============================================
+ Coverage 81.68% 81.73% +0.05%
- Complexity 1641 1665 +24
============================================
Files 79 83 +4
Lines 4139 4211 +72
Branches 1307 1315 +8
============================================
+ Hits 3381 3442 +61
- Misses 229 237 +8
- Partials 529 532 +3
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
Can't reproduce this bug, so added test, that checks it |
diktat-rules/src/test/resources/test/funcTest/FunctionalTestFile.kt
Outdated
Show resolved
Hide resolved
""" | ||
|class Example { | ||
| fun some() { | ||
| val code = ${"\"\"\" class Some {\n \t\t fun for() {} \n \t} \"\"\".trimIndent()"} |
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.
Why do you need ${}
here? Also, this is not exactly example from the issue, there are some different newlines there.
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 is used to insert triple quotes
### 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.
So, after all, the issue isn't reproducible any more? Please write about it in the issue discussion (to not forget later).
diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/LocalVariablesWarnTest.kt
Outdated
Show resolved
Hide resolved
### What's done: * Fixed bugs
…-declaration(#488) # Conflicts: # diktat-rules/src/test/resources/test/smoke/src/main/kotlin/Example4Expected.kt # diktat-rules/src/test/resources/test/smoke/src/main/kotlin/Example4Test.kt
What's done:
This pull request closes #488