Skip to content
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

ClassOrdering rule reports a list of errors #3142

Merged
merged 3 commits into from
Oct 15, 2020

Conversation

hbmartin
Copy link
Contributor

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

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
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
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
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
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.

None yet

4 participants