Skip to content

Commit e788586

Browse files
klint tweaks
1 parent bab3b3c commit e788586

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

gradle/spotless.gradle

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,11 @@ spotless {
4444
toggleOffOn()
4545
// same as kotlin, but for .gradle.kts files (defaults to '*.gradle.kts')
4646
target '*.gradle.kts'
47-
// ktfmt('0.40').kotlinlangStyle() // needs Java 11+
48-
// Newer versions do not work well with the older version of kotlin in this build
49-
ktlint('1.7.1')
47+
ktlint('1.7.1').editorConfigOverride([
48+
// Disable trailing comma rules to minimize diff.
49+
'ktlint_standard_trailing-comma-on-call-site': 'disabled',
50+
'ktlint_standard_trailing-comma-on-declaration-site': 'disabled'
51+
])
5052
}
5153

5254
project.pluginManager.withPlugin('groovy') {
@@ -66,6 +68,7 @@ spotless {
6668
scala {
6769
toggleOffOn()
6870
targetExclude(buildDirectoryFiles)
71+
// TODO: For some reason Scala format is not working for latest versions.
6972
scalafmt('3.8.6').configFile(configPath + '/enforcement/spotless-scalafmt.conf')
7073
}
7174
}
@@ -88,10 +91,12 @@ spotless {
8891
project.pluginManager.withPlugin('kotlin') {
8992
kotlin {
9093
toggleOffOn()
91-
// ktfmt('0.40').kotlinlangStyle() // needs Java 11+
9294
targetExclude(buildDirectoryFiles)
93-
// Newer versions do not work well with the older version of kotlin in this build
94-
ktlint('1.7.1')
95+
ktlint('1.7.1').editorConfigOverride([
96+
// Disable trailing comma rules to minimize diff.
97+
'ktlint_standard_trailing-comma-on-call-site': 'disabled',
98+
'ktlint_standard_trailing-comma-on-declaration-site': 'disabled'
99+
])
95100
}
96101
}
97102
}

0 commit comments

Comments
 (0)