Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* remove unused autoCorrect property * WIP * WIP * fix documentation generation * Allow multiple classes in rule set provider file * remove multirule support in docs * fix style and formatting violations * revert removal of autocorrect prop --------- Co-authored-by: Chao Zhang <chao.zhang@instacart.com>
- Loading branch information
1 parent
6f166ec
commit 2f31eb6
Showing
10 changed files
with
244 additions
and
417 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
...atting/src/main/kotlin/io/gitlab/arturbosch/detekt/formatting/FormattingRuleComparator.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { | ||
if (o1.runAsLateAsPossible == o2.runAsLateAsPossible) { | ||
return 0 | ||
} | ||
return if (o1.runAsLateAsPossible) 1 else -1 | ||
} | ||
} |
Oops, something went wrong.