From 6d4319c2ee2f1b68c8cda64d92d3b2683798c75b Mon Sep 17 00:00:00 2001 From: Nils Christian Haugen Date: Tue, 10 Mar 2026 00:55:53 +0100 Subject: [PATCH 1/3] feat: bump tabletest-formatter 1.0.1 -> 1.1.0 Remove Java 21+ restriction since the library now supports Java 17+, matching spotless's own minimum requirement. --- CHANGES.md | 2 ++ lib/build.gradle | 11 +++-------- .../spotless/java/TableTestFormatterStep.java | 2 +- plugin-gradle/CHANGES.md | 2 ++ plugin-gradle/README.md | 4 ++-- plugin-maven/CHANGES.md | 2 ++ plugin-maven/README.md | 4 ++-- .../spotless/java/TableTestFormatterStepTest.java | 7 +------ 8 files changed, 15 insertions(+), 19 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index c1f915ed42..6e5b605b5b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -10,6 +10,8 @@ This document is intended for Spotless developers. We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `1.27.0`). ## [Unreleased] +### Changes +- Bump default `tabletest-formatter` version `1.0.1` -> `1.1.0`, now works with Java 17+. ## [4.4.0] - 2026-03-02 ### Added diff --git a/lib/build.gradle b/lib/build.gradle index 75e3c017ed..170b4beb95 100644 --- a/lib/build.gradle +++ b/lib/build.gradle @@ -24,12 +24,9 @@ def NEEDS_GLUE = [ 'palantirJavaFormat', 'scalafmt', 'sortPom', + 'tableTestFormatter', 'zjsonPatch', ] -// tableTestFormatter requires Java 21+ -if (JavaVersion.current() >= JavaVersion.VERSION_21) { - NEEDS_GLUE << 'tableTestFormatter' -} for (glue in NEEDS_GLUE) { sourceSets.register(glue) { @@ -127,10 +124,8 @@ dependencies { // sortPom sortPomCompileOnly 'com.github.ekryd.sortpom:sortpom-sorter:4.0.0' sortPomCompileOnly 'org.slf4j:slf4j-api:2.0.17' - // tableTestFormatter (Java 21+ only) - if (JavaVersion.current() >= JavaVersion.VERSION_21) { - tableTestFormatterCompileOnly 'org.tabletest:tabletest-formatter-core:1.0.1' - } + // tableTestFormatter + tableTestFormatterCompileOnly 'org.tabletest:tabletest-formatter-core:1.1.0' // zjsonPatch zjsonPatchCompileOnly 'com.flipkart.zjsonpatch:zjsonpatch:0.4.16' } diff --git a/lib/src/main/java/com/diffplug/spotless/java/TableTestFormatterStep.java b/lib/src/main/java/com/diffplug/spotless/java/TableTestFormatterStep.java index b55f0a9405..f685823c76 100644 --- a/lib/src/main/java/com/diffplug/spotless/java/TableTestFormatterStep.java +++ b/lib/src/main/java/com/diffplug/spotless/java/TableTestFormatterStep.java @@ -34,7 +34,7 @@ public final class TableTestFormatterStep implements Serializable { private static final long serialVersionUID = 1L; private static final String NAME = "tableTestFormatter"; private static final String MAVEN_COORDINATE = "org.tabletest:tabletest-formatter-core:"; - private static final String DEFAULT_VERSION = "1.0.1"; + private static final String DEFAULT_VERSION = "1.1.0"; private final JarState.Promised jarState; private final String version; diff --git a/plugin-gradle/CHANGES.md b/plugin-gradle/CHANGES.md index e0a61cf180..021cffb296 100644 --- a/plugin-gradle/CHANGES.md +++ b/plugin-gradle/CHANGES.md @@ -3,6 +3,8 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `3.27.0`). ## [Unreleased] +### Changes +- Bump default `tabletest-formatter` version `1.0.1` -> `1.1.0`, now works with Java 17+. ## [8.3.0] - 2026-03-02 ### Added diff --git a/plugin-gradle/README.md b/plugin-gradle/README.md index 8823d89c11..23149a2771 100644 --- a/plugin-gradle/README.md +++ b/plugin-gradle/README.md @@ -439,7 +439,7 @@ spotless { java { tableTestFormatter() // optional: you can specify a specific version - tableTestFormatter('1.0.1') + tableTestFormatter('1.1.0') ``` @@ -616,7 +616,7 @@ spotless { kotlin { tableTestFormatter() // optional: you can specify a specific version - tableTestFormatter('1.0.1') + tableTestFormatter('1.1.0') ``` diff --git a/plugin-maven/CHANGES.md b/plugin-maven/CHANGES.md index a34db2ab7e..64871b5d87 100644 --- a/plugin-maven/CHANGES.md +++ b/plugin-maven/CHANGES.md @@ -3,6 +3,8 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `1.27.0`). ## [Unreleased] +### Changes +- Bump default `tabletest-formatter` version `1.0.1` -> `1.1.0`, now works with Java 17+. ## [3.3.0] - 2026-03-02 ### Added diff --git a/plugin-maven/README.md b/plugin-maven/README.md index dc91861ab1..22bf661669 100644 --- a/plugin-maven/README.md +++ b/plugin-maven/README.md @@ -407,7 +407,7 @@ These mechanisms already exist for the Gradle plugin. ```xml - 1.0.1 + 1.1.0 ``` @@ -543,7 +543,7 @@ Additionally, `editorConfigOverride` options will override what's supplied in `. ```xml - 1.0.1 + 1.1.0 ``` diff --git a/testlib/src/test/java/com/diffplug/spotless/java/TableTestFormatterStepTest.java b/testlib/src/test/java/com/diffplug/spotless/java/TableTestFormatterStepTest.java index 787c1a26fb..b0fe5983a1 100644 --- a/testlib/src/test/java/com/diffplug/spotless/java/TableTestFormatterStepTest.java +++ b/testlib/src/test/java/com/diffplug/spotless/java/TableTestFormatterStepTest.java @@ -15,10 +15,7 @@ */ package com.diffplug.spotless.java; -import static org.junit.jupiter.api.condition.JRE.JAVA_21; - import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.condition.EnabledForJreRange; import com.diffplug.spotless.FormatterStep; import com.diffplug.spotless.ResourceHarness; @@ -28,10 +25,9 @@ class TableTestFormatterStepTest extends ResourceHarness { - private static final String VERSION = "1.0.1"; + private static final String VERSION = "1.1.0"; @Test - @EnabledForJreRange(min = JAVA_21) void behavior() { FormatterStep step = TableTestFormatterStep.create(VERSION, TestProvisioner.mavenCentral()); try (StepHarnessWithFile harness = StepHarnessWithFile.forStep(this, step)) { @@ -40,7 +36,6 @@ void behavior() { } @Test - @EnabledForJreRange(min = JAVA_21) void equality() { new SerializableEqualityTester() { String version = VERSION; From 2f328ec969ce46fe013d5295a41d5c161aa305db Mon Sep 17 00:00:00 2001 From: Nils Christian Haugen Date: Tue, 10 Mar 2026 01:03:53 +0100 Subject: [PATCH 2/3] feat: add tableTest format type for .table files Add standalone .table file formatting support via a new tableTest format type in both Gradle and Maven plugins. --- CHANGES.md | 2 + .../glue/java/TableTestFormatterFunc.java | 9 +++- plugin-gradle/CHANGES.md | 2 + plugin-gradle/README.md | 28 ++++++++++++ .../gradle/spotless/SpotlessExtension.java | 6 +++ .../gradle/spotless/TableTestExtension.java | 44 +++++++++++++++++++ .../spotless/TableTestExtensionTest.java | 28 ++++++++++++ plugin-maven/CHANGES.md | 2 + plugin-maven/README.md | 19 ++++++++ .../spotless/maven/AbstractSpotlessMojo.java | 6 ++- .../spotless/maven/tabletest/TableTest.java | 27 ++++++++++++ .../maven/tabletest/TableTestFormatter.java | 23 ++++++++++ .../tableTest/tableFileFormatted.test | 3 ++ .../tableTest/tableFileUnformatted.test | 3 ++ .../java/TableTestFormatterStepTest.java | 8 ++++ 15 files changed, 208 insertions(+), 2 deletions(-) create mode 100644 plugin-gradle/src/main/java/com/diffplug/gradle/spotless/TableTestExtension.java create mode 100644 plugin-gradle/src/test/java/com/diffplug/gradle/spotless/TableTestExtensionTest.java create mode 100644 plugin-maven/src/main/java/com/diffplug/spotless/maven/tabletest/TableTest.java create mode 100644 plugin-maven/src/main/java/com/diffplug/spotless/maven/tabletest/TableTestFormatter.java create mode 100644 testlib/src/main/resources/tableTest/tableFileFormatted.test create mode 100644 testlib/src/main/resources/tableTest/tableFileUnformatted.test diff --git a/CHANGES.md b/CHANGES.md index 6e5b605b5b..f3a8ba11de 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -10,6 +10,8 @@ This document is intended for Spotless developers. We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `1.27.0`). ## [Unreleased] +### Added +- Add `tableTest` format type for standalone `.table` files. ### Changes - Bump default `tabletest-formatter` version `1.0.1` -> `1.1.0`, now works with Java 17+. diff --git a/lib/src/tableTestFormatter/java/com/diffplug/spotless/glue/java/TableTestFormatterFunc.java b/lib/src/tableTestFormatter/java/com/diffplug/spotless/glue/java/TableTestFormatterFunc.java index 35261d5398..935cfe2a59 100644 --- a/lib/src/tableTestFormatter/java/com/diffplug/spotless/glue/java/TableTestFormatterFunc.java +++ b/lib/src/tableTestFormatter/java/com/diffplug/spotless/glue/java/TableTestFormatterFunc.java @@ -20,17 +20,19 @@ import org.tabletest.formatter.config.Config; import org.tabletest.formatter.config.EditorConfigProvider; import org.tabletest.formatter.core.SourceFileFormatter; +import org.tabletest.formatter.core.TableTestFormatter; import com.diffplug.spotless.FormatterFunc; /** - * Formats {@code @TableTest} annotation tables in Java and Kotlin source files. + * Formats {@code @TableTest} annotation tables in Java, Kotlin, and standalone {@code .table} files. */ public class TableTestFormatterFunc implements FormatterFunc.NeedsFile { private static final EditorConfigProvider CONFIG_PROVIDER = new EditorConfigProvider(); private final SourceFileFormatter sourceFormatter = new SourceFileFormatter(); + private final TableTestFormatter tableFormatter = new TableTestFormatter(); @Override public String applyWithFile(String unix, File file) throws Exception { @@ -42,6 +44,11 @@ public String applyWithFile(String unix, File file) throws Exception { return formatted.equals(unix) ? unix : formatted; } + if (fileName.endsWith(".table")) { + String formatted = tableFormatter.format(unix, "", Config.NO_INDENT); + return formatted.equals(unix) ? unix : formatted; + } + return unix; } } diff --git a/plugin-gradle/CHANGES.md b/plugin-gradle/CHANGES.md index 021cffb296..3d181fa2fb 100644 --- a/plugin-gradle/CHANGES.md +++ b/plugin-gradle/CHANGES.md @@ -3,6 +3,8 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `3.27.0`). ## [Unreleased] +### Added +- Add `tableTest` format type for standalone `.table` files. ### Changes - Bump default `tabletest-formatter` version `1.0.1` -> `1.1.0`, now works with Java 17+. diff --git a/plugin-gradle/README.md b/plugin-gradle/README.md index 23149a2771..4f20d26dc9 100644 --- a/plugin-gradle/README.md +++ b/plugin-gradle/README.md @@ -1265,6 +1265,34 @@ shfmt().pathToExe('/opt/homebrew/bin/shfmt') +## TableTest + +- `com.diffplug.gradle.spotless.TableTestExtension` [code](https://github.com/diffplug/spotless/blob/main/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/TableTestExtension.java) + +```gradle +spotless { + tableTest { + target 'src/**/*.table' // you have to set the target manually + tableTestFormatter() // has its own section below + } +} +``` + +### tabletest-formatter + +[homepage](https://github.com/nchaugen/tabletest-formatter). [changelog](https://github.com/nchaugen/tabletest-formatter/releases). Formats standalone [TableTest](https://github.com/nchaugen/tabletest) `.table` files. + +```gradle +spotless { + tableTest { + target 'src/**/*.table' + tableTestFormatter() + // optional: you can specify a specific version + tableTestFormatter('1.1.0') + } +} +``` + ## Gherkin - `com.diffplug.gradle.spotless.GherkinExtension` [javadoc](https://javadoc.io/doc/com.diffplug.spotless/spotless-plugin-gradle/8.3.0/com/diffplug/gradle/spotless/GherkinExtension.html), [code](https://github.com/diffplug/spotless/blob/main/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/GherkinExtension.java) diff --git a/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/SpotlessExtension.java b/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/SpotlessExtension.java index c41b28c331..26e91eba8c 100644 --- a/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/SpotlessExtension.java +++ b/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/SpotlessExtension.java @@ -183,6 +183,12 @@ public void javascript(Action closure) { format(JavascriptExtension.NAME, JavascriptExtension.class, closure); } + /** Configures the special tableTest-specific extension for .table files. */ + public void tableTest(Action closure) { + requireNonNull(closure); + format(TableTestExtension.NAME, TableTestExtension.class, closure); + } + /** Configures the special typescript-specific extension for typescript files. */ public void typescript(Action closure) { format(TypescriptExtension.NAME, TypescriptExtension.class, closure); diff --git a/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/TableTestExtension.java b/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/TableTestExtension.java new file mode 100644 index 0000000000..27df6942b0 --- /dev/null +++ b/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/TableTestExtension.java @@ -0,0 +1,44 @@ +package com.diffplug.gradle.spotless; + +import javax.inject.Inject; + +import com.diffplug.spotless.FormatterStep; +import com.diffplug.spotless.java.TableTestFormatterStep; + +public class TableTestExtension extends FormatExtension { + static final String NAME = "tableTest"; + + @Inject + public TableTestExtension(SpotlessExtension spotless) { + super(spotless); + } + + @Override + protected void setupTask(SpotlessTask task) { + if (target == null) { + throw noDefaultTargetException(); + } + super.setupTask(task); + } + + public TableTestFormatterConfig tableTestFormatter() { + return tableTestFormatter(TableTestFormatterStep.defaultVersion()); + } + + public TableTestFormatterConfig tableTestFormatter(String version) { + return new TableTestFormatterConfig(version); + } + + public class TableTestFormatterConfig { + private final String version; + + TableTestFormatterConfig(String version) { + this.version = version; + addStep(createStep()); + } + + private FormatterStep createStep() { + return TableTestFormatterStep.create(version, provisioner()); + } + } +} diff --git a/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/TableTestExtensionTest.java b/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/TableTestExtensionTest.java new file mode 100644 index 0000000000..28d9b15da5 --- /dev/null +++ b/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/TableTestExtensionTest.java @@ -0,0 +1,28 @@ +package com.diffplug.gradle.spotless; + +import java.io.IOException; + +import org.junit.jupiter.api.Test; + +public class TableTestExtensionTest extends GradleIntegrationHarness { + @Test + public void defaultFormatting() throws IOException { + setFile("build.gradle").toLines( + "plugins {", + " id 'java'", + " id 'com.diffplug.spotless'", + "}", + "repositories { mavenCentral() }", + "spotless {", + " tableTest {", + " target 'src/**/*.table'", + " tableTestFormatter()", + " }", + "}"); + setFile("src/main/resources/example.table").toResource("tableTest/tableFileUnformatted.test"); + setFile("other/example.table").toResource("tableTest/tableFileUnformatted.test"); + gradleRunner().withArguments("spotlessApply").build(); + assertFile("src/main/resources/example.table").sameAsResource("tableTest/tableFileFormatted.test"); + assertFile("other/example.table").sameAsResource("tableTest/tableFileUnformatted.test"); + } +} diff --git a/plugin-maven/CHANGES.md b/plugin-maven/CHANGES.md index 64871b5d87..4ccd4862ea 100644 --- a/plugin-maven/CHANGES.md +++ b/plugin-maven/CHANGES.md @@ -3,6 +3,8 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `1.27.0`). ## [Unreleased] +### Added +- Add `tableTest` format type for standalone `.table` files. ### Changes - Bump default `tabletest-formatter` version `1.0.1` -> `1.1.0`, now works with Java 17+. diff --git a/plugin-maven/README.md b/plugin-maven/README.md index 22bf661669..2481efe54a 100644 --- a/plugin-maven/README.md +++ b/plugin-maven/README.md @@ -1190,6 +1190,25 @@ When formatting shell scripts via `shfmt`, configure `shfmt` settings via `.edit ``` +## TableTest + +[code](https://github.com/diffplug/spotless/blob/main/plugin-maven/src/main/java/com/diffplug/spotless/maven/tabletest/TableTest.java). [available steps](https://github.com/diffplug/spotless/tree/main/plugin-maven/src/main/java/com/diffplug/spotless/maven/tabletest). + +```xml + + + + src/**/*.table + + + 1.1.0 + + + +``` + +[homepage](https://github.com/nchaugen/tabletest-formatter). [changelog](https://github.com/nchaugen/tabletest-formatter/releases). Formats standalone [TableTest](https://github.com/nchaugen/tabletest) `.table` files. + ## Gherkin - `com.diffplug.spotless.maven.FormatterFactory.addStepFactory(FormatterStepFactory)` [code](https://github.com/diffplug/spotless/blob/main/plugin-maven/src/main/java/com/diffplug/spotless/maven/gherkin/Gherkin.java) diff --git a/plugin-maven/src/main/java/com/diffplug/spotless/maven/AbstractSpotlessMojo.java b/plugin-maven/src/main/java/com/diffplug/spotless/maven/AbstractSpotlessMojo.java index 84b980ab5e..0d8c5ea999 100644 --- a/plugin-maven/src/main/java/com/diffplug/spotless/maven/AbstractSpotlessMojo.java +++ b/plugin-maven/src/main/java/com/diffplug/spotless/maven/AbstractSpotlessMojo.java @@ -81,6 +81,7 @@ import com.diffplug.spotless.maven.rdf.Rdf; import com.diffplug.spotless.maven.scala.Scala; import com.diffplug.spotless.maven.shell.Shell; +import com.diffplug.spotless.maven.tabletest.TableTest; import com.diffplug.spotless.maven.sql.Sql; import com.diffplug.spotless.maven.typescript.Typescript; import com.diffplug.spotless.maven.yaml.Yaml; @@ -208,6 +209,9 @@ public abstract class AbstractSpotlessMojo extends AbstractMojo { @Parameter private Protobuf protobuf; + @Parameter + private TableTest tableTest; + @Parameter(property = "spotlessFiles") private String filePatterns; @@ -410,7 +414,7 @@ private FileLocator getFileLocator() { } private List getFormatterFactories() { - return Stream.concat(formats.stream(), Stream.of(groovy, java, scala, kotlin, cpp, css, typescript, javascript, antlr4, pom, sql, python, markdown, json, shell, yaml, gherkin, go, rdf, protobuf)) + return Stream.concat(formats.stream(), Stream.of(groovy, java, scala, kotlin, cpp, css, typescript, javascript, antlr4, pom, sql, python, markdown, json, shell, yaml, gherkin, go, rdf, protobuf, tableTest)) .filter(Objects::nonNull) .map(factory -> factory.init(repositorySystemSession)) .collect(toList()); diff --git a/plugin-maven/src/main/java/com/diffplug/spotless/maven/tabletest/TableTest.java b/plugin-maven/src/main/java/com/diffplug/spotless/maven/tabletest/TableTest.java new file mode 100644 index 0000000000..421b237853 --- /dev/null +++ b/plugin-maven/src/main/java/com/diffplug/spotless/maven/tabletest/TableTest.java @@ -0,0 +1,27 @@ +package com.diffplug.spotless.maven.tabletest; + +import java.util.Collections; +import java.util.Set; + +import org.apache.maven.project.MavenProject; + +import com.diffplug.spotless.maven.FormatterFactory; + +/** + * A {@link FormatterFactory} implementation that corresponds to {@code ...} configuration element. + */ +public class TableTest extends FormatterFactory { + @Override + public Set defaultIncludes(MavenProject project) { + return Collections.emptySet(); + } + + @Override + public String licenseHeaderDelimiter() { + return null; + } + + public void addTableTestFormatter(TableTestFormatter tableTestFormatter) { + addStepFactory(tableTestFormatter); + } +} diff --git a/plugin-maven/src/main/java/com/diffplug/spotless/maven/tabletest/TableTestFormatter.java b/plugin-maven/src/main/java/com/diffplug/spotless/maven/tabletest/TableTestFormatter.java new file mode 100644 index 0000000000..b2a281a0a6 --- /dev/null +++ b/plugin-maven/src/main/java/com/diffplug/spotless/maven/tabletest/TableTestFormatter.java @@ -0,0 +1,23 @@ +package com.diffplug.spotless.maven.tabletest; + +import org.apache.maven.plugins.annotations.Parameter; + +import com.diffplug.spotless.FormatterStep; +import com.diffplug.spotless.java.TableTestFormatterStep; +import com.diffplug.spotless.maven.FormatterStepConfig; +import com.diffplug.spotless.maven.FormatterStepFactory; + +/** + * Formats standalone {@code .table} files. Configuration is read from {@code .editorconfig} files. + */ +public class TableTestFormatter implements FormatterStepFactory { + + @Parameter + private String version; + + @Override + public FormatterStep newFormatterStep(FormatterStepConfig config) { + String version = this.version != null ? this.version : TableTestFormatterStep.defaultVersion(); + return TableTestFormatterStep.create(version, config.getProvisioner()); + } +} diff --git a/testlib/src/main/resources/tableTest/tableFileFormatted.test b/testlib/src/main/resources/tableTest/tableFileFormatted.test new file mode 100644 index 0000000000..4fd1542317 --- /dev/null +++ b/testlib/src/main/resources/tableTest/tableFileFormatted.test @@ -0,0 +1,3 @@ +name | age | city +Alice | 30 | London +Bob | 25 | Manchester diff --git a/testlib/src/main/resources/tableTest/tableFileUnformatted.test b/testlib/src/main/resources/tableTest/tableFileUnformatted.test new file mode 100644 index 0000000000..85823c967a --- /dev/null +++ b/testlib/src/main/resources/tableTest/tableFileUnformatted.test @@ -0,0 +1,3 @@ +name|age|city +Alice|30|London +Bob|25|Manchester diff --git a/testlib/src/test/java/com/diffplug/spotless/java/TableTestFormatterStepTest.java b/testlib/src/test/java/com/diffplug/spotless/java/TableTestFormatterStepTest.java index b0fe5983a1..7d6e6981ce 100644 --- a/testlib/src/test/java/com/diffplug/spotless/java/TableTestFormatterStepTest.java +++ b/testlib/src/test/java/com/diffplug/spotless/java/TableTestFormatterStepTest.java @@ -35,6 +35,14 @@ void behavior() { } } + @Test + void behaviorTableFile() { + FormatterStep step = TableTestFormatterStep.create(VERSION, TestProvisioner.mavenCentral()); + try (StepHarnessWithFile harness = StepHarnessWithFile.forStep(this, step)) { + harness.testResource("example.table", "tableTest/tableFileUnformatted.test", "tableTest/tableFileFormatted.test"); + } + } + @Test void equality() { new SerializableEqualityTester() { From 6a022572fa211da27b839424a7bccc73b843e6a7 Mon Sep 17 00:00:00 2001 From: Nils Christian Haugen Date: Tue, 10 Mar 2026 01:10:06 +0100 Subject: [PATCH 3/3] fix: apply spotless formatting to new files --- .../gradle/spotless/TableTestExtension.java | 15 +++++++++++++++ .../gradle/spotless/TableTestExtensionTest.java | 15 +++++++++++++++ .../spotless/maven/AbstractSpotlessMojo.java | 2 +- .../spotless/maven/tabletest/TableTest.java | 15 +++++++++++++++ .../maven/tabletest/TableTestFormatter.java | 15 +++++++++++++++ 5 files changed, 61 insertions(+), 1 deletion(-) diff --git a/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/TableTestExtension.java b/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/TableTestExtension.java index 27df6942b0..22d2c75d60 100644 --- a/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/TableTestExtension.java +++ b/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/TableTestExtension.java @@ -1,3 +1,18 @@ +/* + * Copyright 2026 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.gradle.spotless; import javax.inject.Inject; diff --git a/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/TableTestExtensionTest.java b/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/TableTestExtensionTest.java index 28d9b15da5..3e24ab4a84 100644 --- a/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/TableTestExtensionTest.java +++ b/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/TableTestExtensionTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2026 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.gradle.spotless; import java.io.IOException; diff --git a/plugin-maven/src/main/java/com/diffplug/spotless/maven/AbstractSpotlessMojo.java b/plugin-maven/src/main/java/com/diffplug/spotless/maven/AbstractSpotlessMojo.java index 0d8c5ea999..26c3e602c4 100644 --- a/plugin-maven/src/main/java/com/diffplug/spotless/maven/AbstractSpotlessMojo.java +++ b/plugin-maven/src/main/java/com/diffplug/spotless/maven/AbstractSpotlessMojo.java @@ -81,8 +81,8 @@ import com.diffplug.spotless.maven.rdf.Rdf; import com.diffplug.spotless.maven.scala.Scala; import com.diffplug.spotless.maven.shell.Shell; -import com.diffplug.spotless.maven.tabletest.TableTest; import com.diffplug.spotless.maven.sql.Sql; +import com.diffplug.spotless.maven.tabletest.TableTest; import com.diffplug.spotless.maven.typescript.Typescript; import com.diffplug.spotless.maven.yaml.Yaml; diff --git a/plugin-maven/src/main/java/com/diffplug/spotless/maven/tabletest/TableTest.java b/plugin-maven/src/main/java/com/diffplug/spotless/maven/tabletest/TableTest.java index 421b237853..8eaa971758 100644 --- a/plugin-maven/src/main/java/com/diffplug/spotless/maven/tabletest/TableTest.java +++ b/plugin-maven/src/main/java/com/diffplug/spotless/maven/tabletest/TableTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2026 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.maven.tabletest; import java.util.Collections; diff --git a/plugin-maven/src/main/java/com/diffplug/spotless/maven/tabletest/TableTestFormatter.java b/plugin-maven/src/main/java/com/diffplug/spotless/maven/tabletest/TableTestFormatter.java index b2a281a0a6..64caf057c2 100644 --- a/plugin-maven/src/main/java/com/diffplug/spotless/maven/tabletest/TableTestFormatter.java +++ b/plugin-maven/src/main/java/com/diffplug/spotless/maven/tabletest/TableTestFormatter.java @@ -1,3 +1,18 @@ +/* + * Copyright 2026 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.maven.tabletest; import org.apache.maven.plugins.annotations.Parameter;