Conversation
cacac1f to
5e9e552
Compare
Codecov Report
@@ Coverage Diff @@
## master #3088 +/- ##
============================================
+ Coverage 79.28% 79.30% +0.01%
- Complexity 2567 2577 +10
============================================
Files 434 435 +1
Lines 7735 7756 +21
Branches 1469 1476 +7
============================================
+ Hits 6133 6151 +18
- Misses 816 817 +1
- Partials 786 788 +2
Continue to review full report at Codecov.
|
5e9e552 to
d8121af
Compare
cortinico
left a comment
There was a problem hiding this comment.
Great rule 👌 I'm just unsure if we want to enabled it by default as it has the risk of raising a lot of warnings for our users. However the logic is really straightforward and aligned with the Kotlin guidelines.
Sorry I wasn't clear. I've enabled it for detekt scans of the detekt project itself, but it's not enabled by default for users - it's I also think that in almost all cases any violations it finds will lead to a more logical class layout so I think there's value in enabling it. It's quick to cut/paste code to fix issues it finds. But for now it's not enabled by default. |
BraisGabin
left a comment
There was a problem hiding this comment.
I like this one a lot! Myabe we could add some configuration later but, let's see what the community think when they test it :)
Thanks for the clarification 👌 Looks good to me 🚀 |
A rule to check the contents of a class match this ordering: https://kotlinlang.org/docs/reference/coding-conventions.html#class-layout
I've enabled this for detekt, and you can see in that second commit the changes that were required to comply with the new rule. I think the changes are mostly not controversial, but for those classes where they are a suppression is probably the right way to go, or perhaps changing some extension properties into extension functions.