@@ -94,24 +94,6 @@ void integration_default_diktat() throws IOException {
9494 assertThat (result .getOutput ()).contains ("[AVOID_NESTED_FUNCTIONS] try to avoid using nested functions" );
9595 }
9696
97- @ Test
98- void integration_pinterest () throws IOException {
99- setFile ("build.gradle" ).toLines (
100- "plugins {" ,
101- " id 'org.jetbrains.kotlin.jvm' version '1.5.31'" ,
102- " id 'com.diffplug.spotless'" ,
103- "}" ,
104- "repositories { mavenCentral() }" ,
105- "spotless {" ,
106- " kotlinGradle {" ,
107- " ktlint('0.32.0')" ,
108- " }" ,
109- "}" );
110- setFile ("configuration.gradle.kts" ).toResource ("kotlin/ktlint/basic.dirty" );
111- gradleRunner ().withArguments ("spotlessApply" ).build ();
112- assertFile ("configuration.gradle.kts" ).sameAsResource ("kotlin/ktlint/basic.clean" );
113- }
114-
11597 @ Test
11698 void indentStep () throws IOException {
11799 setFile ("build.gradle" ).toLines (
@@ -147,24 +129,6 @@ void withExperimental() throws IOException {
147129 assertFile ("configuration.gradle.kts" ).sameAsResource ("kotlin/ktlint/experimental.clean" );
148130 }
149131
150- @ Test
151- void withExperimental_0_32 () throws IOException {
152- setFile ("build.gradle" ).toLines (
153- "plugins {" ,
154- " id 'org.jetbrains.kotlin.jvm' version '1.5.31'" ,
155- " id 'com.diffplug.spotless'" ,
156- "}" ,
157- "repositories { mavenCentral() }" ,
158- "spotless {" ,
159- " kotlinGradle {" ,
160- " ktlint('0.32.0').setUseExperimental(true)" ,
161- " }" ,
162- "}" );
163- setFile ("configuration.gradle.kts" ).toResource ("kotlin/ktlint/basic.dirty" );
164- gradleRunner ().withArguments ("spotlessApply" ).build ();
165- assertFile ("configuration.gradle.kts" ).sameAsResource ("kotlin/ktlint/basic.clean" );
166- }
167-
168132 @ Test
169133 void withExperimentalEditorConfigOverride () throws IOException {
170134 setFile ("build.gradle" ).toLines (
@@ -187,53 +151,6 @@ void withExperimentalEditorConfigOverride() throws IOException {
187151 assertFile ("configuration.gradle.kts" ).sameAsResource ("kotlin/ktlint/experimentalEditorConfigOverride.clean" );
188152 }
189153
190- @ Test
191- void withEditorConfigOverride_0_45_1 () throws IOException {
192- setFile ("build.gradle" ).toLines (
193- "plugins {" ,
194- " id 'org.jetbrains.kotlin.jvm' version '1.5.31'" ,
195- " id 'com.diffplug.spotless'" ,
196- "}" ,
197- "repositories { mavenCentral() }" ,
198- "spotless {" ,
199- " kotlinGradle {" ,
200- " ktlint('0.45.1')" ,
201- " .editorConfigOverride([" ,
202- " indent_size: 5" ,
203- " ])" ,
204- " }" ,
205- "}" );
206- setFile ("configuration.gradle.kts" ).toResource ("kotlin/ktlint/basic.dirty" );
207- Throwable error = assertThrows (Throwable .class ,
208- () -> gradleRunner ().withArguments ("spotlessApply" ).build ());
209- assertThat (error ).hasMessageContaining ("KtLint editorConfigOverride supported for version 0.45.2 and later" );
210- }
211-
212- /**
213- * Check that the sample used to verify the experimental ruleset is untouched by the default ruleset, to verify
214- * that enabling the experimental ruleset is actually doing something.
215- *
216- * If this test fails, it's likely that the experimental rule being used as a test graduated into the standard
217- * ruleset, and therefore a new experimental rule should be used to verify functionality.
218- */
219- @ Test
220- void experimentalSampleUnchangedWithDefaultRuleset () throws IOException {
221- setFile ("build.gradle" ).toLines (
222- "plugins {" ,
223- " id 'org.jetbrains.kotlin.jvm' version '1.5.31'" ,
224- " id 'com.diffplug.spotless'" ,
225- "}" ,
226- "repositories { mavenCentral() }" ,
227- "spotless {" ,
228- " kotlinGradle {" ,
229- " ktlint()" ,
230- " }" ,
231- "}" );
232- setFile ("configuration.gradle.kts" ).toResource ("kotlin/ktlint/experimental.dirty" );
233- gradleRunner ().withArguments ("spotlessApply" ).build ();
234- assertFile ("configuration.gradle.kts" ).sameAsResource ("kotlin/ktlint/experimental.dirty" );
235- }
236-
237154 @ Test
238155 @ EnabledForJreRange (min = JAVA_11 ) // ktfmt's dependency, google-java-format 1.8 requires a minimum of JRE 11+.
239156 void integration_ktfmt () throws IOException {
0 commit comments