-
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
Rule 6.1.4 several init blocks are redundant and generally should not be used in your class #459
Conversation
### What's done: * Initial implementation * Fixed typos in code style
# Conflicts: # diktat-analysis.yml # diktat-rules/src/main/kotlin/generated/WarningNames.kt # diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/constants/Warnings.kt # diktat-rules/src/main/resources/diktat-analysis-huawei.yml # diktat-rules/src/main/resources/diktat-analysis.yml # info/available-rules.md
### What's done: * paragraph6 -> chapter6
### What's done: * Fixes
Codecov Report
@@ Coverage Diff @@
## master #459 +/- ##
============================================
- Coverage 81.98% 81.91% -0.07%
- Complexity 1451 1461 +10
============================================
Files 70 71 +1
Lines 3624 3689 +65
Branches 1159 1178 +19
============================================
+ Hits 2971 3022 +51
Misses 202 202
- Partials 451 465 +14
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: * More logic
### What's done: * More logic
### What's done: * More logic
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.
lgtm
package test.chapter6.init_blocks | ||
|
||
class Example { | ||
init { println("Lorem ipsum") } |
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 I have started thinking right now that there is a possibility to break the code here.
If someone will do the following:
init { println(1) }
val a = "".also {
println(3)
}
init { println(2) }
We will break expected print chain
What's done:
This pull request closes #440
Actions checklist
Fixme
init
blocks