-
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
Data class rule: removing several cases from the scope of the inspection #1471
Conversation
diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/classes/DataClassesRule.kt
Fixed
Show fixed
Hide fixed
Codecov Report
@@ Coverage Diff @@
## master #1471 +/- ##
============================================
+ Coverage 83.25% 83.27% +0.02%
- Complexity 2561 2569 +8
============================================
Files 110 110
Lines 7661 7661
Branches 2107 2107
============================================
+ Hits 6378 6380 +2
+ Misses 392 387 -5
- Partials 891 894 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
4800ee4
to
ef977b9
Compare
### What's done: - Removed annotation, value, sealed, inline, inner classes from the scope - Added tests
8f7af8c
to
20b3e2c
Compare
### What's done: - Removed annotation, value, sealed, inline, inner classes from the scope - Added tests
@@ -128,6 +127,12 @@ class DataClassesRule(configRules: List<RulesConfig>) : DiktatRule( | |||
return true | |||
} | |||
|
|||
/** we do not exclude inner classes and enums here as if they have no |
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.
kek
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.
also I have no idea, why "open" is prohibited
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.
but what is the idea? You have open class only with data and properties?
Why not abstract class in this case?
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.
If there are no abstract fields, than diktat will suggest to change abstract
to open
¯\(ツ)/¯
### What's done: - review notes
### What's done: - review notes
diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/classes/DataClassesRule.kt
Fixed
Show fixed
Hide fixed
diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/classes/DataClassesRule.kt
Fixed
Show fixed
Hide fixed
### What's done: - review notes
diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/DataClassesRuleWarnTest.kt
Fixed
Show fixed
Hide fixed
### What's done: - review notes
5205bad
to
74039e2
Compare
What's done: