Skip to content

ClassOrdering rule reports a list of errors#3142

Merged
schalkms merged 3 commits into
detekt:masterfrom
hbmartin:ClassOrdering-list-findings
Oct 15, 2020
Merged

ClassOrdering rule reports a list of errors#3142
schalkms merged 3 commits into
detekt:masterfrom
hbmartin:ClassOrdering-list-findings

Conversation

@hbmartin
Copy link
Copy Markdown
Contributor

Also report entity where error occurred not just parent class
@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 11, 2020

Codecov Report

Merging #3142 into master will increase coverage by 0.05%.
The diff coverage is 87.09%.

Impacted file tree graph

@@             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     
Impacted Files Coverage Δ Complexity Δ
...turbosch/detekt/rules/style/UnusedPrivateMember.kt 90.62% <78.94%> (+0.35%) 5.00 <0.00> (ø)
...lab/arturbosch/detekt/rules/style/ClassOrdering.kt 91.89% <100.00%> (+1.89%) 4.00 <0.00> (ø)
...ain/kotlin/io/gitlab/arturbosch/detekt/api/Rule.kt 100.00% <0.00%> (+6.66%) 15.00% <0.00%> (+1.00%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4722c26...be32c31. Read the comment docs.

Copy link
Copy Markdown
Member

@schalkms schalkms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing this issue and further improving this rule!
Please see my attached comments in regards to two minor improvements.

Copy link
Copy Markdown
Member

@schalkms schalkms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good one!

@BraisGabin
Copy link
Copy Markdown
Member

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.

@hbmartin
Copy link
Copy Markdown
Contributor Author

@BraisGabin made an issue to track your comment: #3144 , please assign to me 😃

@schalkms schalkms merged commit a714f54 into detekt:master Oct 15, 2020
@arturbosch arturbosch added this to the 1.14.2 milestone Oct 17, 2020
atulgpt added a commit to atulgpt/detekt that referenced this pull request Apr 15, 2023
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
atulgpt added a commit to atulgpt/detekt that referenced this pull request Apr 15, 2023
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
atulgpt added a commit to atulgpt/detekt that referenced this pull request Apr 15, 2023
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
atulgpt added a commit to atulgpt/detekt that referenced this pull request Apr 15, 2023
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
atulgpt added a commit to atulgpt/detekt that referenced this pull request Apr 15, 2023
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants