Skip to content

Commit 0d1f612

Browse files
authored
Test Spotless Ktlint integration in kts
1 parent 3c5a9b0 commit 0d1f612

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

plugin-gradle/src/test/java/com/diffplug/gradle/spotless/KotlinExtensionTest.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -143,21 +143,21 @@ void testSetEditorConfigCanOverrideEditorConfigFile() throws IOException {
143143

144144
@Test
145145
void withCustomRuleSetApply() throws IOException {
146-
setFile("build.gradle").toLines(
146+
setFile("build.gradle.kts").toLines(
147147
"plugins {",
148-
" id 'org.jetbrains.kotlin.jvm' version '1.6.21'",
149-
" id 'com.diffplug.spotless'",
148+
" id(\"org.jetbrains.kotlin.jvm\") version \"1.6.21\"",
149+
" id(\"com.diffplug.spotless\")",
150150
"}",
151151
"repositories { mavenCentral() }",
152152
"spotless {",
153153
" kotlin {",
154154
" ktlint(\"1.0.1\")",
155-
" .customRuleSets([",
155+
" .customRuleSets(listOf(",
156156
" \"io.nlopez.compose.rules:ktlint:0.3.3\"",
157-
" ])",
158-
" .editorConfigOverride([",
159-
" ktlint_function_naming_ignore_when_annotated_with: \"Composable\",",
160-
" ])",
157+
" ))",
158+
" .editorConfigOverride(mapOf(",
159+
" \"ktlint_function_naming_ignore_when_annotated_with\" to \"Composable\"",
160+
" ))",
161161
" }",
162162
"}");
163163
setFile("src/main/kotlin/Main.kt").toResource("kotlin/ktlint/listScreen.dirty");

0 commit comments

Comments
 (0)