ClassOrdering rule reports a list of errors#3142
Conversation
hbmartin
commented
Oct 11, 2020
- Addresses ClassOrdering only reports first misorder, not all misorders #3141 where only the first misorder in a class is reported
- Also report entity where error occurred, not just parent class
- Both of these changes might break existing baselines? - not sure how to address this
- Follow up to ClassOrdering reports a message describing the misorder #3138
Also report entity where error occurred not just parent class
Codecov Report
@@ Coverage Diff @@
## master #3142 +/- ##
============================================
+ Coverage 79.46% 79.52% +0.05%
- Complexity 2591 2592 +1
============================================
Files 437 437
Lines 7830 7852 +22
Branches 1490 1495 +5
============================================
+ Hits 6222 6244 +22
+ Misses 819 817 -2
- Partials 789 791 +2
Continue to review full report at Codecov.
|
schalkms
left a comment
There was a problem hiding this comment.
Thanks for addressing this issue and further improving this rule!
Please see my attached comments in regards to two minor improvements.
|
I'm not sure if this is the best way to report all the errors. I mean, we can be reporting more than the actual movements that you need to do. This is the same problem as find the minimum insertions to sort an array (related links) I'm not against merging this because it's better than the current implementation but I think that we should keep an issue to track this and implement it to report the proper number of issues. |
|
@BraisGabin made an issue to track your comment: #3144 , please assign to me 😃 |
And based on that find the minimal violation Original implementation comment at detekt#3142 (comment) which suggested the [algo](https://www.geeksforgeeks.org/minimum-insertions-sort-array/) from which this change is derived
And based on that find the minimal violation Original implementation comment at detekt#3142 (comment) which suggested the [algo](https://www.geeksforgeeks.org/minimum-insertions-sort-array/) from which this change is derived
And based on that find the minimal violation Original implementation comment at detekt#3142 (comment) which suggested the [algo](https://www.geeksforgeeks.org/minimum-insertions-sort-array/) from which this change is derived
And based on that find the minimal violation Original implementation comment at detekt#3142 (comment) which suggested the [algo](https://www.geeksforgeeks.org/minimum-insertions-sort-array/) from which this change is derived
And based on that find the minimal violation Original implementation comment at detekt#3142 (comment) which suggested the [algo](https://www.geeksforgeeks.org/minimum-insertions-sort-array/) from which this change is derived