-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
830eda5
commit 1941025
Showing
6 changed files
with
28 additions
and
23 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
15 changes: 15 additions & 0 deletions
15
src/main/kotlin/org/jmailen/gradle/kotlinter/support/KtLintEditoConfigOverrides.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,15 @@ | ||
package org.jmailen.gradle.kotlinter.support | ||
|
||
import com.pinterest.ktlint.core.api.DefaultEditorConfigProperties.disabledRulesProperty | ||
import com.pinterest.ktlint.core.api.EditorConfigOverride | ||
import com.pinterest.ktlint.core.api.EditorConfigOverride.Companion.emptyEditorConfigOverride | ||
|
||
internal fun editorConfigOverride(ktLintParams: KtLintParams): EditorConfigOverride { | ||
val rules = ktLintParams.disabledRules | ||
|
||
return if (rules.isEmpty()) { | ||
emptyEditorConfigOverride | ||
} else { | ||
EditorConfigOverride.from(disabledRulesProperty to rules.joinToString(separator = ",")) | ||
} | ||
} |
10 changes: 0 additions & 10 deletions
10
src/main/kotlin/org/jmailen/gradle/kotlinter/support/KtLintUserData.kt
This file was deleted.
Oops, something went wrong.
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
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
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