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
Replace KtLintMultiRule
#6094
Replace KtLintMultiRule
#6094
Changes from 10 commits
63d8904
fdab15e
cbca76a
912c750
c78a25e
4aff430
7d3bf24
edd9698
59d8b87
37c820c
b5d3565
8373fce
0d76036
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package io.gitlab.arturbosch.detekt.formatting | ||
|
||
/** | ||
* This serves as weak heuristic to order the wrapped rules according to their visitor modifiers. | ||
* Currently only RunAsLateAsPossible is supported. | ||
*/ | ||
internal object FormattingRuleComparator : Comparator<FormattingRule> { | ||
override fun compare(o1: FormattingRule, o2: FormattingRule): Int { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ktlint also defines There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yap, that is described in #5259 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 😭. Would you mind if I contribute to this PR as well? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I do not mind at all. But I would not want to fix the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems that we agreed that this PR can be merged post 1.23 |
||
if (o1.runAsLateAsPossible == o2.runAsLateAsPossible) { | ||
return 0 | ||
} | ||
return if (o1.runAsLateAsPossible) 1 else -1 | ||
} | ||
} |
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.
This property was seemingly unused. What am I missing?
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.
See #6094 (comment)
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.
So this Kotlin property is not used in production
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.
Thank you. I have reverted the change.