diff --git a/CHANGES.md b/CHANGES.md index 1f4a847074..e8af5aec03 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -20,6 +20,9 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format ( ### Changes * Rename `YamlJacksonStep` into `JacksonYamlStep` while normalizing Jackson usage ([#1492](https://github.com/diffplug/spotless/pull/1492)) * Convert `gson` integration to use a compile-only source set ([#1510](https://github.com/diffplug/spotless/pull/1510)). +* ** POTENTIALLY BREAKING** Removed support for KtLint 0.3x and 0.45.2 ([#1475](https://github.com/diffplug/spotless/pull/1475)) + * `KtLint` does not maintain a stable API - before this PR, we supported every breaking change in the API since 2019. + * From now on, we will support no more than 2 breaking changes at a time. ## [2.32.0] - 2023-01-13 ### Added diff --git a/lib/build.gradle b/lib/build.gradle index 9913542785..82595da399 100644 --- a/lib/build.gradle +++ b/lib/build.gradle @@ -29,11 +29,10 @@ for (glue in NEEDS_GLUE) { versionCompatibility { adapters { namespaces.register('KtLint') { + // as discussed at https://github.com/diffplug/spotless/pull/1475 + // we will support no more than 2 breaking changes at a time = 3 incompatible versions + // we will try to drop down to only one version if a stable API can be maintained for a full year versions = [ - '0.31.0', - '0.32.0', - '0.34.2', - '0.45.2', '0.46.0', '0.47.0', '0.48.0', @@ -81,21 +80,6 @@ dependencies { ktlintCompileOnly "com.pinterest.ktlint:ktlint-ruleset-experimental:$VER_KTLINT" ktlintCompileOnly "com.pinterest.ktlint:ktlint-ruleset-standard:$VER_KTLINT" - compatKtLint0Dot31Dot0CompileOnly 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.20' - compatKtLint0Dot31Dot0CompileOnly 'com.github.shyiko.ktlint:ktlint-core:0.31.0' - compatKtLint0Dot31Dot0CompileOnly 'com.github.shyiko.ktlint:ktlint-ruleset-experimental:0.31.0' - compatKtLint0Dot31Dot0CompileOnly 'com.github.shyiko.ktlint:ktlint-ruleset-standard:0.31.0' - compatKtLint0Dot32Dot0CompileOnly 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.20' - compatKtLint0Dot32Dot0CompileOnly 'com.pinterest.ktlint:ktlint-core:0.32.0' - compatKtLint0Dot32Dot0CompileOnly 'com.pinterest.ktlint:ktlint-ruleset-experimental:0.32.0' - compatKtLint0Dot32Dot0CompileOnly 'com.pinterest.ktlint:ktlint-ruleset-standard:0.32.0' - compatKtLint0Dot34Dot2CompileOnly 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.20' - compatKtLint0Dot34Dot2CompileOnly 'com.pinterest.ktlint:ktlint-core:0.34.2' - compatKtLint0Dot34Dot2CompileOnly 'com.pinterest.ktlint:ktlint-ruleset-experimental:0.34.2' - compatKtLint0Dot34Dot2CompileOnly 'com.pinterest.ktlint:ktlint-ruleset-standard:0.34.2' - compatKtLint0Dot45Dot2CompileOnly 'com.pinterest.ktlint:ktlint-core:0.45.2' - compatKtLint0Dot45Dot2CompileOnly 'com.pinterest.ktlint:ktlint-ruleset-experimental:0.45.2' - compatKtLint0Dot45Dot2CompileOnly 'com.pinterest.ktlint:ktlint-ruleset-standard:0.45.2' compatKtLint0Dot46Dot0CompileOnly 'com.pinterest.ktlint:ktlint-core:0.46.0' compatKtLint0Dot46Dot0CompileOnly 'com.pinterest.ktlint:ktlint-ruleset-experimental:0.46.0' compatKtLint0Dot46Dot0CompileOnly 'com.pinterest.ktlint:ktlint-ruleset-standard:0.46.0' diff --git a/lib/src/compatKtLint0Dot31Dot0/java/com/diffplug/spotless/glue/ktlint/compat/KtLintCompat0Dot31Dot0Adapter.java b/lib/src/compatKtLint0Dot31Dot0/java/com/diffplug/spotless/glue/ktlint/compat/KtLintCompat0Dot31Dot0Adapter.java deleted file mode 100644 index 7a956de86a..0000000000 --- a/lib/src/compatKtLint0Dot31Dot0/java/com/diffplug/spotless/glue/ktlint/compat/KtLintCompat0Dot31Dot0Adapter.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2022-2023 DiffPlug - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.diffplug.spotless.glue.ktlint.compat; - -import java.nio.file.Path; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -import com.github.shyiko.ktlint.core.KtLint; -import com.github.shyiko.ktlint.core.LintError; -import com.github.shyiko.ktlint.core.RuleSet; -import com.github.shyiko.ktlint.ruleset.experimental.ExperimentalRuleSetProvider; -import com.github.shyiko.ktlint.ruleset.standard.StandardRuleSetProvider; - -import kotlin.Unit; -import kotlin.jvm.functions.Function2; - -public class KtLintCompat0Dot31Dot0Adapter implements KtLintCompatAdapter { - - static class FormatterCallback implements Function2 { - @Override - public Unit invoke(LintError lint, Boolean corrected) { - if (!corrected) { - KtLintCompatReporting.report(lint.getLine(), lint.getCol(), lint.getRuleId(), lint.getDetail()); - } - return null; - } - } - - @Override - public String format(final String text, Path path, final boolean isScript, - final boolean useExperimental, - Path editorConfigPath, final Map userData, - final Map editorConfigOverrideMap) { - final FormatterCallback formatterCallback = new FormatterCallback(); - - final List rulesets = new ArrayList<>(); - rulesets.add(new StandardRuleSetProvider().get()); - - if (useExperimental) { - rulesets.add(new ExperimentalRuleSetProvider().get()); - } - - return KtLint.INSTANCE.format( - text, - rulesets, - userData, - formatterCallback); - } -} diff --git a/lib/src/compatKtLint0Dot32Dot0/java/com/diffplug/spotless/glue/ktlint/compat/KtLintCompat0Dot32Dot0Adapter.java b/lib/src/compatKtLint0Dot32Dot0/java/com/diffplug/spotless/glue/ktlint/compat/KtLintCompat0Dot32Dot0Adapter.java deleted file mode 100644 index 94c41c3716..0000000000 --- a/lib/src/compatKtLint0Dot32Dot0/java/com/diffplug/spotless/glue/ktlint/compat/KtLintCompat0Dot32Dot0Adapter.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2022-2023 DiffPlug - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.diffplug.spotless.glue.ktlint.compat; - -import java.nio.file.Path; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -import com.pinterest.ktlint.core.KtLint; -import com.pinterest.ktlint.core.LintError; -import com.pinterest.ktlint.core.RuleSet; -import com.pinterest.ktlint.ruleset.experimental.ExperimentalRuleSetProvider; -import com.pinterest.ktlint.ruleset.standard.StandardRuleSetProvider; - -import kotlin.Unit; -import kotlin.jvm.functions.Function2; - -public class KtLintCompat0Dot32Dot0Adapter implements KtLintCompatAdapter { - - static class FormatterCallback implements Function2 { - @Override - public Unit invoke(LintError lint, Boolean corrected) { - if (!corrected) { - KtLintCompatReporting.report(lint.getLine(), lint.getCol(), lint.getRuleId(), lint.getDetail()); - } - return null; - } - } - - @Override - public String format(final String text, Path path, final boolean isScript, - final boolean useExperimental, - Path editorConfigPath, final Map userData, - final Map editorConfigOverrideMap) { - final FormatterCallback formatterCallback = new FormatterCallback(); - - final List rulesets = new ArrayList<>(); - rulesets.add(new StandardRuleSetProvider().get()); - - if (useExperimental) { - rulesets.add(new ExperimentalRuleSetProvider().get()); - } - - return KtLint.INSTANCE.format( - text, - rulesets, - userData, - formatterCallback); - } -} diff --git a/lib/src/compatKtLint0Dot34Dot2/java/com/diffplug/spotless/glue/ktlint/compat/KtLintCompat0Dot34Dot2Adapter.java b/lib/src/compatKtLint0Dot34Dot2/java/com/diffplug/spotless/glue/ktlint/compat/KtLintCompat0Dot34Dot2Adapter.java deleted file mode 100644 index 1b8509902c..0000000000 --- a/lib/src/compatKtLint0Dot34Dot2/java/com/diffplug/spotless/glue/ktlint/compat/KtLintCompat0Dot34Dot2Adapter.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2022-2023 DiffPlug - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.diffplug.spotless.glue.ktlint.compat; - -import java.nio.file.Path; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -import com.pinterest.ktlint.core.KtLint; -import com.pinterest.ktlint.core.LintError; -import com.pinterest.ktlint.core.RuleSet; -import com.pinterest.ktlint.ruleset.experimental.ExperimentalRuleSetProvider; -import com.pinterest.ktlint.ruleset.standard.StandardRuleSetProvider; - -import kotlin.Unit; -import kotlin.jvm.functions.Function2; - -public class KtLintCompat0Dot34Dot2Adapter implements KtLintCompatAdapter { - - static class FormatterCallback implements Function2 { - @Override - public Unit invoke(LintError lint, Boolean corrected) { - if (!corrected) { - KtLintCompatReporting.report(lint.getLine(), lint.getCol(), lint.getRuleId(), lint.getDetail()); - } - return null; - } - } - - @Override - public String format(final String text, Path path, final boolean isScript, - final boolean useExperimental, - Path editorConfigPath, final Map userData, - final Map editorConfigOverrideMap) { - final FormatterCallback formatterCallback = new FormatterCallback(); - - final List rulesets = new ArrayList<>(); - rulesets.add(new StandardRuleSetProvider().get()); - - if (useExperimental) { - rulesets.add(new ExperimentalRuleSetProvider().get()); - } - - return KtLint.INSTANCE.format(new KtLint.Params( - path.toFile().getAbsolutePath(), - text, - rulesets, - userData, - formatterCallback, - isScript, - editorConfigPath == null ? null : editorConfigPath.toFile().getAbsolutePath(), - false)); - } -} diff --git a/lib/src/compatKtLint0Dot45Dot2/java/com/diffplug/spotless/glue/ktlint/compat/KtLintCompat0Dot45Dot2Adapter.java b/lib/src/compatKtLint0Dot45Dot2/java/com/diffplug/spotless/glue/ktlint/compat/KtLintCompat0Dot45Dot2Adapter.java deleted file mode 100644 index 23fb2b4c5c..0000000000 --- a/lib/src/compatKtLint0Dot45Dot2/java/com/diffplug/spotless/glue/ktlint/compat/KtLintCompat0Dot45Dot2Adapter.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright 2022-2023 DiffPlug - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.diffplug.spotless.glue.ktlint.compat; - -import java.nio.file.Path; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.stream.Collectors; -import java.util.stream.Stream; - -import com.pinterest.ktlint.core.KtLint; -import com.pinterest.ktlint.core.LintError; -import com.pinterest.ktlint.core.RuleSet; -import com.pinterest.ktlint.core.api.DefaultEditorConfigProperties; -import com.pinterest.ktlint.core.api.EditorConfigOverride; -import com.pinterest.ktlint.core.api.UsesEditorConfigProperties; -import com.pinterest.ktlint.ruleset.experimental.ExperimentalRuleSetProvider; -import com.pinterest.ktlint.ruleset.standard.StandardRuleSetProvider; - -import kotlin.Pair; -import kotlin.Unit; -import kotlin.jvm.functions.Function2; - -public class KtLintCompat0Dot45Dot2Adapter implements KtLintCompatAdapter { - - static class FormatterCallback implements Function2 { - @Override - public Unit invoke(LintError lint, Boolean corrected) { - if (!corrected) { - KtLintCompatReporting.report(lint.getLine(), lint.getCol(), lint.getRuleId(), lint.getDetail()); - } - return null; - } - } - - @Override - public String format(final String text, Path path, final boolean isScript, - final boolean useExperimental, - Path editorConfigPath, final Map userData, - final Map editorConfigOverrideMap) { - final FormatterCallback formatterCallback = new FormatterCallback(); - - final List rulesets = new ArrayList<>(); - rulesets.add(new StandardRuleSetProvider().get()); - - if (useExperimental) { - rulesets.add(new ExperimentalRuleSetProvider().get()); - } - - EditorConfigOverride editorConfigOverride; - if (editorConfigOverrideMap.isEmpty()) { - editorConfigOverride = EditorConfigOverride.Companion.getEmptyEditorConfigOverride(); - } else { - editorConfigOverride = createEditorConfigOverride(rulesets, editorConfigOverrideMap); - } - - return KtLint.INSTANCE.format(new KtLint.ExperimentalParams( - path.toFile().getAbsolutePath(), - text, - rulesets, - userData, - formatterCallback, - isScript, - editorConfigPath == null ? null : editorConfigPath.toFile().getAbsolutePath(), - false, - editorConfigOverride, - false)); - } - - /** - * Create EditorConfigOverride from user provided parameters. - * Calling this method requires KtLint 0.45.2. - */ - private static EditorConfigOverride createEditorConfigOverride(final List rulesets, Map editorConfigOverrideMap) { - // Get properties from rules in the rule sets - Stream> ruleProperties = rulesets.stream() - .flatMap(ruleSet -> Arrays.stream(ruleSet.getRules())) - .filter(rule -> rule instanceof UsesEditorConfigProperties) - .flatMap(rule -> ((UsesEditorConfigProperties) rule).getEditorConfigProperties().stream()); - - // Create a mapping of properties to their names based on rule properties and default properties - Map> supportedProperties = Stream - .concat(ruleProperties, DefaultEditorConfigProperties.INSTANCE.getDefaultEditorConfigProperties().stream()) - .distinct() - .collect(Collectors.toMap(property -> property.getType().getName(), property -> property)); - - // Create config properties based on provided property names and values - @SuppressWarnings("unchecked") - Pair, ?>[] properties = editorConfigOverrideMap.entrySet().stream() - .map(entry -> { - UsesEditorConfigProperties.EditorConfigProperty property = supportedProperties.get(entry.getKey()); - if (property != null) { - return new Pair<>(property, entry.getValue()); - } else { - return null; - } - }) - .filter(Objects::nonNull) - .toArray(Pair[]::new); - - return EditorConfigOverride.Companion.from(properties); - } -} diff --git a/lib/src/ktlint/java/com/diffplug/spotless/glue/ktlint/KtlintFormatterFunc.java b/lib/src/ktlint/java/com/diffplug/spotless/glue/ktlint/KtlintFormatterFunc.java index e6f3715d25..02ff5355e3 100644 --- a/lib/src/ktlint/java/com/diffplug/spotless/glue/ktlint/KtlintFormatterFunc.java +++ b/lib/src/ktlint/java/com/diffplug/spotless/glue/ktlint/KtlintFormatterFunc.java @@ -44,21 +44,9 @@ public KtlintFormatterFunc(String version, boolean isScript, boolean useExperime } else if (minorVersion == 47) { // rename RuleSet to RuleProvider this.adapter = new KtLintCompat0Dot47Dot0Adapter(); - } else if (minorVersion >= 46) { + } else { // DefaultEditorConfigProperties.INSTANCE.getDefaultEditorConfigProperties() renamed to .getEditorConfigProperties() this.adapter = new KtLintCompat0Dot46Dot0Adapter(); - } else if (version.equals("0.45.2")) { - // add editorConfigOverride - this.adapter = new KtLintCompat0Dot45Dot2Adapter(); - } else if (minorVersion >= 34) { - // KtLint.INSTANCE.format() now needs more parameters - this.adapter = new KtLintCompat0Dot34Dot2Adapter(); - } else if (minorVersion >= 32) { - // rename packages from `com.github.shyiko` to `com.pinterest` - this.adapter = new KtLintCompat0Dot32Dot0Adapter(); - } else { - // the OG - this.adapter = new KtLintCompat0Dot31Dot0Adapter(); } this.editorConfigPath = editorConfigPath; this.useExperimental = useExperimental; diff --git a/plugin-gradle/CHANGES.md b/plugin-gradle/CHANGES.md index f8a6242adf..17bf123b41 100644 --- a/plugin-gradle/CHANGES.md +++ b/plugin-gradle/CHANGES.md @@ -7,11 +7,13 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format ( * Support `jackson()` for YAML files ([#1492](https://github.com/diffplug/spotless/pull/1492)) * Support `jackson()` for JSON files ([#1492](https://github.com/diffplug/spotless/pull/1492)) * Allow to specify node executable for node-based formatters using `nodeExecutable` parameter ([#1500](https://github.com/diffplug/spotless/pull/1500)) +* Prettier will now suggest to install plugins if a parser cannot be inferred from the file extension ([#1511](https://github.com/diffplug/spotless/pull/1511)) ### Fixed * The default list of type annotations used by `formatAnnotations` has had 8 more annotations from the Checker Framework added [#1494](https://github.com/diffplug/spotless/pull/1494) ### Changes -* Prettier will now suggest to install plugins if a parser cannot be inferred from the file extension ([#1511](https://github.com/diffplug/spotless/pull/1511)) - +* **POTENTIALLY BREAKING** Removed support for KtLint 0.3x and 0.45.2 ([#1475](https://github.com/diffplug/spotless/pull/1475)) + * `KtLint` does not maintain a stable API - before this PR, we supported every breaking change in the API since 2019. + * From now on, we will support no more than 2 breaking changes at a time. ## [6.13.0] - 2023-01-14 ### Added diff --git a/plugin-maven/CHANGES.md b/plugin-maven/CHANGES.md index f1ab739b62..448011be3c 100644 --- a/plugin-maven/CHANGES.md +++ b/plugin-maven/CHANGES.md @@ -14,7 +14,9 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format ( ### Changes * Spotless' custom build was replaced by [`maven-plugin-development`](https://github.com/britter/maven-plugin-development). ([#1496](https://github.com/diffplug/spotless/pull/1496) fixes [#554](https://github.com/diffplug/spotless/issues/554)) * Prettier will now suggest to install plugins if a parser cannot be inferred from the file extension ([#1511](https://github.com/diffplug/spotless/pull/1511)) - +* **POTENTIALLY BREAKING** Removed support for KtLint 0.3x and 0.45.2 ([#1475](https://github.com/diffplug/spotless/pull/1475)) + * `KtLint` does not maintain a stable API - before this PR, we supported every breaking change in the API since 2019. + * From now on, we will support no more than 2 breaking changes at a time. ## [2.30.0] - 2023-01-13 ### Added diff --git a/testlib/src/test/java/com/diffplug/spotless/kotlin/KtLintStepTest.java b/testlib/src/test/java/com/diffplug/spotless/kotlin/KtLintStepTest.java index 1be0c7b72f..3047245298 100644 --- a/testlib/src/test/java/com/diffplug/spotless/kotlin/KtLintStepTest.java +++ b/testlib/src/test/java/com/diffplug/spotless/kotlin/KtLintStepTest.java @@ -15,13 +15,11 @@ */ package com.diffplug.spotless.kotlin; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import com.diffplug.spotless.FormatterStep; import com.diffplug.spotless.ResourceHarness; import com.diffplug.spotless.SerializableEqualityTester; -import com.diffplug.spotless.StepHarness; import com.diffplug.spotless.StepHarnessWithFile; import com.diffplug.spotless.TestProvisioner; @@ -37,68 +35,6 @@ void behavior() { "Wildcard import"); } - @Test - void worksShyiko() { - FormatterStep step = KtLintStep.create("0.31.0", TestProvisioner.mavenCentral()); - StepHarnessWithFile.forStep(this, step) - .testResource("kotlin/ktlint/basic.dirty", "kotlin/ktlint/basic.clean") - .testResourceExceptionMsg("kotlin/ktlint/unsolvable.dirty").isEqualTo( - "Error on line: 1, column: 1\n" + - "rule: no-wildcard-imports\n" + - "Wildcard import"); - } - - // Regression test to ensure it works on the version it switched to Pinterest (version 0.32.0) - // but before 0.34. - // https://github.com/diffplug/spotless/issues/419 - @Test - void worksPinterestAndPre034() { - FormatterStep step = KtLintStep.create("0.32.0", TestProvisioner.mavenCentral()); - StepHarnessWithFile.forStep(this, step) - .testResource("kotlin/ktlint/basic.dirty", "kotlin/ktlint/basic.clean") - .testResourceExceptionMsg("kotlin/ktlint/unsolvable.dirty").isEqualTo("Error on line: 1, column: 1\n" + - "rule: no-wildcard-imports\n" + - "Wildcard import"); - } - - // Regression test to handle alpha and 1.x version numbers - // https://github.com/diffplug/spotless/issues/668 - @Test - void worksAlpha1() { - FormatterStep step = KtLintStep.create("0.38.0-alpha01", TestProvisioner.mavenCentral()); - StepHarness.forStep(step) - .testResource("kotlin/ktlint/basic.dirty", "kotlin/ktlint/basic.clean"); - } - - @Test - void works0_44_0() { - FormatterStep step = KtLintStep.create("0.44.0", TestProvisioner.mavenCentral()); - StepHarness.forStep(step) - .testResource("kotlin/ktlint/basic.dirty", "kotlin/ktlint/basic.clean"); - } - - @Disabled("https://github.com/pinterest/ktlint/issues/1421") - @Test - void works0_45_0() { - FormatterStep step = KtLintStep.create("0.45.0", TestProvisioner.mavenCentral()); - StepHarness.forStep(step) - .testResource("kotlin/ktlint/basic.dirty", "kotlin/ktlint/basic.clean"); - } - - @Test - void works0_45_1() { - FormatterStep step = KtLintStep.create("0.45.1", TestProvisioner.mavenCentral()); - StepHarness.forStep(step) - .testResource("kotlin/ktlint/basic.dirty", "kotlin/ktlint/basic.clean"); - } - - @Test - void works0_45_2() { - FormatterStep step = KtLintStep.create("0.45.2", TestProvisioner.mavenCentral()); - StepHarness.forStep(step) - .testResource("kotlin/ktlint/basic.dirty", "kotlin/ktlint/basic.clean"); - } - @Test void works0_46_0() { FormatterStep step = KtLintStep.create("0.46.0", TestProvisioner.mavenCentral());