-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade to ktlint 0.34.0 and introduce 2.0 with additional configurat…
…ion (#108) * Upgrade to ktlint 0.34.0 and introduce 2.0 with additional configuration Breaks compatibility, but introduces powerful new rules available in 0.34.0 and granular ways to configure them. - ktlint 0.34.0 - support editorconfig - configuration for excluding rulesets - configuration for excluding rules * refactor to allow changing configuration options easy * Add support for editorconfig * Support for disabling rules * Update readme
- Loading branch information
1 parent
d3062ca
commit d2656c8
Showing
18 changed files
with
185 additions
and
204 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
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
12 changes: 12 additions & 0 deletions
12
src/main/kotlin/org/jmailen/gradle/kotlinter/support/KtLintParams.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,12 @@ | ||
package org.jmailen.gradle.kotlinter.support | ||
|
||
import org.jmailen.gradle.kotlinter.KotlinterExtension | ||
import java.io.Serializable | ||
|
||
data class KtLintParams( | ||
var indentSize: Int = KotlinterExtension.DEFAULT_INDENT_SIZE, | ||
var continuationIndentSize: Int = KotlinterExtension.DEFAULT_CONTINUATION_INDENT_SIZE, | ||
var experimentalRules: Boolean = KotlinterExtension.DEFAULT_EXPERIMENTAL_RULES, | ||
var disabledRules: Array<String> = KotlinterExtension.DEFAULT_DISABLED_RULES, | ||
var editorConfigPath: String? = null | ||
) : Serializable |
7 changes: 7 additions & 0 deletions
7
src/main/kotlin/org/jmailen/gradle/kotlinter/support/KtLintUserData.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,7 @@ | ||
package org.jmailen.gradle.kotlinter.support | ||
|
||
fun userData(ktLintParams: KtLintParams) = mapOf( | ||
"indent_size" to ktLintParams.indentSize.toString(), | ||
"continuation_indent_size" to ktLintParams.continuationIndentSize.toString(), | ||
"disabled_rules" to ktLintParams.disabledRules.joinToString(",") | ||
) |
File renamed without changes.
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
7 changes: 0 additions & 7 deletions
7
src/main/kotlin/org/jmailen/gradle/kotlinter/support/ktLintConfig.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
Oops, something went wrong.