diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml
index 9603cdc553..05eed17b0f 100644
--- a/.github/workflows/claude.yml
+++ b/.github/workflows/claude.yml
@@ -21,6 +21,7 @@ jobs:
contents: read
pull-requests: read
issues: read
+ members: read
id-token: write
steps:
- name: Check team membership
diff --git a/CHANGES.md b/CHANGES.md
index b3fc00ed35..9861bd1ead 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -12,6 +12,8 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
## [Unreleased]
### Fixed
- palantirJavaFormat is no longer arbitrarily set to outdated versions on Java 17, latest available version is always used ([#2686](https://github.com/diffplug/spotless/pull/2686) fixes [#2685](https://github.com/diffplug/spotless/issues/2685))
+### Added
+- Add a `forbidModuleImports` API for java ([#2679](https://github.com/diffplug/spotless/issues/2679))
## [4.0.0] - 2025-09-24
### Changes
diff --git a/README.md b/README.md
index 498894688a..b2df639559 100644
--- a/README.md
+++ b/README.md
@@ -86,6 +86,7 @@ lib('java.ImportOrderStep') +'{{yes}} | {{yes}}
lib('java.PalantirJavaFormatStep') +'{{yes}} | {{yes}} | {{no}} | {{no}} |',
lib('java.RemoveUnusedImportsStep') +'{{yes}} | {{yes}} | {{yes}} | {{no}} |',
lib('java.ForbidWildcardImportsStep') +'{{yes}} | {{yes}} | {{yes}} | {{no}} |',
+lib('java.ForbidModuleImportsStep') +'{{yes}} | {{yes}} | {{no}} | {{no}} |',
extra('java.EclipseJdtFormatterStep') +'{{yes}} | {{yes}} | {{yes}} | {{no}} |',
lib('java.FormatAnnotationsStep') +'{{yes}} | {{yes}} | {{no}} | {{no}} |',
lib('java.CleanthatJavaStep') +'{{yes}} | {{yes}} | {{no}} | {{no}} |',
@@ -142,6 +143,7 @@ lib('yaml.JacksonYamlStep') +'{{yes}} | {{yes}}
| [`java.PalantirJavaFormatStep`](lib/src/main/java/com/diffplug/spotless/java/PalantirJavaFormatStep.java) | :+1: | :+1: | :white_large_square: | :white_large_square: |
| [`java.RemoveUnusedImportsStep`](lib/src/main/java/com/diffplug/spotless/java/RemoveUnusedImportsStep.java) | :+1: | :+1: | :+1: | :white_large_square: |
| [`java.ForbidWildcardImportsStep`](lib/src/main/java/com/diffplug/spotless/java/ForbidWildcardImportsStep.java) | :+1: | :+1: | :+1: | :white_large_square: |
+| [`java.ForbidModuleImportsStep`](lib/src/main/java/com/diffplug/spotless/java/ForbidModuleImportsStep.java) | :+1: | :+1: | :white_large_square: | :white_large_square: |
| [`java.EclipseJdtFormatterStep`](lib-extra/src/main/java/com/diffplug/spotless/extra/java/EclipseJdtFormatterStep.java) | :+1: | :+1: | :+1: | :white_large_square: |
| [`java.FormatAnnotationsStep`](lib/src/main/java/com/diffplug/spotless/java/FormatAnnotationsStep.java) | :+1: | :+1: | :white_large_square: | :white_large_square: |
| [`java.CleanthatJavaStep`](lib/src/main/java/com/diffplug/spotless/java/CleanthatJavaStep.java) | :+1: | :+1: | :white_large_square: | :white_large_square: |
diff --git a/lib/src/main/java/com/diffplug/spotless/java/ForbidModuleImportsStep.java b/lib/src/main/java/com/diffplug/spotless/java/ForbidModuleImportsStep.java
new file mode 100644
index 0000000000..98098df63d
--- /dev/null
+++ b/lib/src/main/java/com/diffplug/spotless/java/ForbidModuleImportsStep.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2025 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.java;
+
+import com.diffplug.spotless.FormatterStep;
+import com.diffplug.spotless.generic.ReplaceRegexStep;
+
+/** Forbids any module import statements. */
+public final class ForbidModuleImportsStep {
+
+ /**
+ * Matches lines like 'import module java.base;' or 'import module java.sql;'.
+ */
+ private static final String REGEX = "(?m)^import module[^;\\n]*;\\R?";
+ private static final String NAME = "forbidModuleImports";
+ private static final String ERROR = "Do not use module imports - replace with specific class imports as 'spotlessApply' cannot auto-fix this";
+
+ private ForbidModuleImportsStep() {}
+
+ public static FormatterStep create() {
+ return ReplaceRegexStep.lint(NAME, REGEX, ERROR);
+ }
+}
diff --git a/plugin-gradle/CHANGES.md b/plugin-gradle/CHANGES.md
index d2eb548268..ce7e9073d8 100644
--- a/plugin-gradle/CHANGES.md
+++ b/plugin-gradle/CHANGES.md
@@ -5,6 +5,8 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
## [Unreleased]
### Fixed
- palantirJavaFormat is no longer arbitrarily set to outdated versions on Java 17, latest available version is always used ([#2686](https://github.com/diffplug/spotless/pull/2686) fixes [#2685](https://github.com/diffplug/spotless/issues/2685))
+### Added
+- `forbidModuleImports()` API for java ([#2679](https://github.com/diffplug/spotless/issues/2679))
## [8.0.0] - 2025-09-24
### Changed
diff --git a/plugin-gradle/README.md b/plugin-gradle/README.md
index ac7b0f4ede..2ccf4676dc 100644
--- a/plugin-gradle/README.md
+++ b/plugin-gradle/README.md
@@ -207,6 +207,7 @@ spotless {
removeUnusedImports()
forbidWildcardImports()
+ forbidModuleImports()
// Cleanthat will refactor your code, but it may break your style: apply it before your formatter
cleanthat() // has its own section below
@@ -257,6 +258,16 @@ spotless {
}
```
+### forbidModuleImports
+
+```
+spotless {
+ java {
+ forbidModuleImports()
+ }
+}
+```
+
### google-java-format
[homepage](https://github.com/google/google-java-format). [changelog](https://github.com/google/google-java-format/releases).
diff --git a/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/JavaExtension.java b/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/JavaExtension.java
index e76e1e8350..f74761a019 100644
--- a/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/JavaExtension.java
+++ b/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/JavaExtension.java
@@ -36,6 +36,7 @@
import com.diffplug.spotless.extra.java.EclipseJdtFormatterStep;
import com.diffplug.spotless.generic.LicenseHeaderStep;
import com.diffplug.spotless.java.CleanthatJavaStep;
+import com.diffplug.spotless.java.ForbidModuleImportsStep;
import com.diffplug.spotless.java.ForbidWildcardImportsStep;
import com.diffplug.spotless.java.FormatAnnotationsStep;
import com.diffplug.spotless.java.GoogleJavaFormatStep;
@@ -162,6 +163,10 @@ public void forbidWildcardImports() {
addStep(ForbidWildcardImportsStep.create());
}
+ public void forbidModuleImports() {
+ addStep(ForbidModuleImportsStep.create());
+ }
+
/** Uses the google-java-format jar to format source code. */
public GoogleJavaFormatConfig googleJavaFormat() {
return googleJavaFormat(GoogleJavaFormatStep.defaultVersion());
diff --git a/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/JavaDefaultTargetTest.java b/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/JavaDefaultTargetTest.java
index 21e372a822..d24b5685c1 100644
--- a/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/JavaDefaultTargetTest.java
+++ b/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/JavaDefaultTargetTest.java
@@ -82,7 +82,7 @@ void removeUnusedImportsWithCleanthat() throws IOException {
}
@Test
- void removeWildCardImports() throws IOException {
+ void forbidWildcardImports() throws IOException {
setFile("build.gradle").toLines(
"plugins {",
" id 'com.diffplug.spotless'",
@@ -92,13 +92,33 @@ void removeWildCardImports() throws IOException {
"spotless {",
" java {",
" target file('test.java')",
- " removeWildcardImports()",
+ " forbidWildcardImports()",
" }",
"}");
- setFile("test.java").toResource("java/removewildcardimports/JavaCodeWildcardsUnformatted.test");
+ setFile("test.java").toResource("java/forbidwildcardimports/JavaCodeWildcardsUnformatted.test");
gradleRunner().withArguments("spotlessApply").buildAndFail();
- assertFile("test.java").sameAsResource("java/removewildcardimports/JavaCodeWildcardsFormatted.test");
+ assertFile("test.java").sameAsResource("java/forbidwildcardimports/JavaCodeWildcardsFormatted.test");
+ }
+
+ @Test
+ void forbidModuleImports() throws IOException {
+ setFile("build.gradle").toLines(
+ "plugins {",
+ " id 'com.diffplug.spotless'",
+ "}",
+ "repositories { mavenCentral() }",
+ "",
+ "spotless {",
+ " java {",
+ " target file('test.java')",
+ " forbidModuleImports()",
+ " }",
+ "}");
+
+ setFile("test.java").toResource("java/forbidmoduleimports/JavaCodeModuleImportsUnformatted.test");
+ gradleRunner().withArguments("spotlessApply").buildAndFail();
+ assertFile("test.java").sameAsResource("java/forbidmoduleimports/JavaCodeModuleImportsFormatted.test");
}
/**
diff --git a/plugin-maven/CHANGES.md b/plugin-maven/CHANGES.md
index 8a49b4f2ce..02fd3a1dc8 100644
--- a/plugin-maven/CHANGES.md
+++ b/plugin-maven/CHANGES.md
@@ -5,6 +5,8 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
## [Unreleased]
### Fixed
- palantirJavaFormat is no longer arbitrarily set to outdated versions on Java 17, latest available version is always used ([#2686](https://github.com/diffplug/spotless/pull/2686) fixes [#2685](https://github.com/diffplug/spotless/issues/2685))
+### Added
+- `` API for java ([#2679](https://github.com/diffplug/spotless/issues/2679))
## [3.0.0] - 2025-09-24
### Changes
diff --git a/plugin-maven/README.md b/plugin-maven/README.md
index 7de87eb5fa..35d50b6057 100644
--- a/plugin-maven/README.md
+++ b/plugin-maven/README.md
@@ -231,6 +231,7 @@ any other maven phase (i.e. compile) then it can be configured as below;
+
@@ -255,6 +256,12 @@ any other maven phase (i.e. compile) then it can be configured as below;
```
+### forbidModuleImports
+
+```xml
+
+```
+
### google-java-format
[homepage](https://github.com/google/google-java-format). [changelog](https://github.com/google/google-java-format/releases). [code](https://github.com/diffplug/spotless/blob/main/plugin-maven/src/main/java/com/diffplug/spotless/maven/java/GoogleJavaFormat.java).
diff --git a/plugin-maven/src/main/java/com/diffplug/spotless/maven/java/ForbidModuleImports.java b/plugin-maven/src/main/java/com/diffplug/spotless/maven/java/ForbidModuleImports.java
new file mode 100644
index 0000000000..31a379bf83
--- /dev/null
+++ b/plugin-maven/src/main/java/com/diffplug/spotless/maven/java/ForbidModuleImports.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2025 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.java;
+
+import com.diffplug.spotless.FormatterStep;
+import com.diffplug.spotless.java.ForbidModuleImportsStep;
+import com.diffplug.spotless.maven.FormatterStepConfig;
+import com.diffplug.spotless.maven.FormatterStepFactory;
+
+public class ForbidModuleImports implements FormatterStepFactory {
+ @Override
+ public FormatterStep newFormatterStep(FormatterStepConfig config) {
+ return ForbidModuleImportsStep.create();
+ }
+}
diff --git a/plugin-maven/src/main/java/com/diffplug/spotless/maven/java/Java.java b/plugin-maven/src/main/java/com/diffplug/spotless/maven/java/Java.java
index ecd035ff9e..acc97647d7 100644
--- a/plugin-maven/src/main/java/com/diffplug/spotless/maven/java/Java.java
+++ b/plugin-maven/src/main/java/com/diffplug/spotless/maven/java/Java.java
@@ -80,6 +80,10 @@ public void addForbidWildcardImports(ForbidWildcardImports forbidWildcardImports
addStepFactory(forbidWildcardImports);
}
+ public void addForbidModuleImports(ForbidModuleImports forbidModuleImports) {
+ addStepFactory(forbidModuleImports);
+ }
+
public void addFormatAnnotations(FormatAnnotations formatAnnotations) {
addStepFactory(formatAnnotations);
}
diff --git a/plugin-maven/src/test/java/com/diffplug/spotless/maven/java/ForbidModuleImportsStepTest.java b/plugin-maven/src/test/java/com/diffplug/spotless/maven/java/ForbidModuleImportsStepTest.java
new file mode 100644
index 0000000000..25af3d4e04
--- /dev/null
+++ b/plugin-maven/src/test/java/com/diffplug/spotless/maven/java/ForbidModuleImportsStepTest.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2025 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.java;
+
+import org.junit.jupiter.api.Test;
+
+import com.diffplug.spotless.maven.MavenIntegrationHarness;
+
+class ForbidModuleImportsStepTest extends MavenIntegrationHarness {
+
+ @Test
+ void testForbidModuleImports() throws Exception {
+ writePomWithJavaSteps("");
+
+ String path = "src/main/java/test.java";
+ setFile(path).toResource("java/forbidmoduleimports/JavaCodeModuleImportsUnformatted.test");
+ var selfie = expectSelfieErrorMsg(mavenRunner().withArguments("spotless:apply").runHasError());
+ assertFile(path).sameAsResource("java/forbidmoduleimports/JavaCodeModuleImportsUnformatted.test");
+ selfie.toBe("""
+ Failed to execute goal com.diffplug.spotless:spotless-maven-plugin:VERSION:apply (default-cli) on project spotless-maven-plugin-tests: There were 2 lint error(s), they must be fixed or suppressed.
+ src/main/java/test.java:L1 forbidModuleImports(import module java.base;) Do not use module imports - replace with specific class imports as 'spotlessApply' cannot auto-fix this
+ src/main/java/test.java:L2 forbidModuleImports(import module java.sql;) Do not use module imports - replace with specific class imports as 'spotlessApply' cannot auto-fix this
+ Resolve these lints or suppress with ``
+ """);
+ }
+}
diff --git a/plugin-maven/src/test/java/com/diffplug/spotless/maven/java/ForbidWildcardImportsStepTest.java b/plugin-maven/src/test/java/com/diffplug/spotless/maven/java/ForbidWildcardImportsStepTest.java
index 073cac701d..72d7d6e16f 100644
--- a/plugin-maven/src/test/java/com/diffplug/spotless/maven/java/ForbidWildcardImportsStepTest.java
+++ b/plugin-maven/src/test/java/com/diffplug/spotless/maven/java/ForbidWildcardImportsStepTest.java
@@ -26,9 +26,9 @@ void testForbidWildcardImports() throws Exception {
writePomWithJavaSteps("");
String path = "src/main/java/test.java";
- setFile(path).toResource("java/removewildcardimports/JavaCodeWildcardsUnformatted.test");
+ setFile(path).toResource("java/forbidwildcardimports/JavaCodeWildcardsUnformatted.test");
var selfie = expectSelfieErrorMsg(mavenRunner().withArguments("spotless:apply").runHasError());
- assertFile(path).sameAsResource("java/removewildcardimports/JavaCodeWildcardsUnformatted.test");
+ assertFile(path).sameAsResource("java/forbidwildcardimports/JavaCodeWildcardsUnformatted.test");
selfie.toBe("""
Failed to execute goal com.diffplug.spotless:spotless-maven-plugin:VERSION:apply (default-cli) on project spotless-maven-plugin-tests: There were 5 lint error(s), they must be fixed or suppressed.
src/main/java/test.java:L1 forbidWildcardImports(import java.util.*;) Do not use wildcard imports (e.g. java.util.*) - replace with specific class imports (e.g. java.util.List) as 'spotlessApply' cannot auto-fix this
diff --git a/plugin-maven/src/test/java/com/diffplug/spotless/maven/java/LintSuppressionTest.java b/plugin-maven/src/test/java/com/diffplug/spotless/maven/java/LintSuppressionTest.java
index e1975de5da..5b73ada41e 100644
--- a/plugin-maven/src/test/java/com/diffplug/spotless/maven/java/LintSuppressionTest.java
+++ b/plugin-maven/src/test/java/com/diffplug/spotless/maven/java/LintSuppressionTest.java
@@ -30,7 +30,7 @@ void testNoSuppressionFailsOnWildcardImports() throws Exception {
writePomWithJavaSteps("");
String path = "src/main/java/TestFile.java";
- setFile(path).toResource("java/removewildcardimports/JavaCodeWildcardsUnformatted.test");
+ setFile(path).toResource("java/forbidwildcardimports/JavaCodeWildcardsUnformatted.test");
expectSelfieErrorMsg(mavenRunner().withArguments("spotless:check").runHasError()).toBe("""
Failed to execute goal com.diffplug.spotless:spotless-maven-plugin:VERSION:check (default-cli) on project spotless-maven-plugin-tests: Unable to format file ${PROJECT_DIR}/src/main/java/TestFile.java
@@ -58,8 +58,8 @@ void testSuppressByFilePath() throws Exception {
String suppressedFile = "src/main/java/TestFile1.java";
String unsuppressedFile = "src/main/java/TestFile2.java";
- setFile(suppressedFile).toResource("java/removewildcardimports/JavaCodeWildcardsUnformatted.test");
- setFile(unsuppressedFile).toResource("java/removewildcardimports/JavaCodeWildcardsUnformatted.test");
+ setFile(suppressedFile).toResource("java/forbidwildcardimports/JavaCodeWildcardsUnformatted.test");
+ setFile(unsuppressedFile).toResource("java/forbidwildcardimports/JavaCodeWildcardsUnformatted.test");
var result = mavenRunner().withArguments("spotless:check").runHasError();
assertThat(result.stdOutUtf8()).contains("TestFile2.java");
@@ -79,7 +79,7 @@ void testSuppressByStep() throws Exception {
"");
String path = "src/main/java/TestFile.java";
- setFile(path).toResource("java/removewildcardimports/JavaCodeWildcardsUnformatted.test");
+ setFile(path).toResource("java/forbidwildcardimports/JavaCodeWildcardsUnformatted.test");
// Should succeed because we suppressed the entire step
mavenRunner().withArguments("spotless:check").runNoError();
@@ -99,7 +99,7 @@ void testSuppressByShortCode() throws Exception {
"");
String path = "src/main/java/TestFile.java";
- setFile(path).toResource("java/removewildcardimports/JavaCodeWildcardsUnformatted.test");
+ setFile(path).toResource("java/forbidwildcardimports/JavaCodeWildcardsUnformatted.test");
// Should succeed because we suppressed all error codes
mavenRunner().withArguments("spotless:check").runNoError();
@@ -126,9 +126,9 @@ void testMultipleSuppressionsWork() throws Exception {
String file2 = "src/main/java/TestFile2.java";
String file3 = "src/main/java/TestFile3.java";
- setFile(file1).toResource("java/removewildcardimports/JavaCodeWildcardsUnformatted.test");
- setFile(file2).toResource("java/removewildcardimports/JavaCodeWildcardsUnformatted.test");
- setFile(file3).toResource("java/removewildcardimports/JavaCodeWildcardsUnformatted.test");
+ setFile(file1).toResource("java/forbidwildcardimports/JavaCodeWildcardsUnformatted.test");
+ setFile(file2).toResource("java/forbidwildcardimports/JavaCodeWildcardsUnformatted.test");
+ setFile(file3).toResource("java/forbidwildcardimports/JavaCodeWildcardsUnformatted.test");
var result = mavenRunner().withArguments("spotless:check").runHasError();
assertThat(result.stdOutUtf8()).contains("TestFile3.java");
diff --git a/testlib/src/main/resources/java/forbidmoduleimports/JavaCodeModuleImportsFormatted.test b/testlib/src/main/resources/java/forbidmoduleimports/JavaCodeModuleImportsFormatted.test
new file mode 100644
index 0000000000..69db0a5127
--- /dev/null
+++ b/testlib/src/main/resources/java/forbidmoduleimports/JavaCodeModuleImportsFormatted.test
@@ -0,0 +1,4 @@
+import module java.base;
+import module java.sql;
+
+public class Test {}
\ No newline at end of file
diff --git a/testlib/src/main/resources/java/forbidmoduleimports/JavaCodeModuleImportsUnformatted.test b/testlib/src/main/resources/java/forbidmoduleimports/JavaCodeModuleImportsUnformatted.test
new file mode 100644
index 0000000000..69db0a5127
--- /dev/null
+++ b/testlib/src/main/resources/java/forbidmoduleimports/JavaCodeModuleImportsUnformatted.test
@@ -0,0 +1,4 @@
+import module java.base;
+import module java.sql;
+
+public class Test {}
\ No newline at end of file
diff --git a/testlib/src/main/resources/java/removewildcardimports/JavaCodeNoWildcardsFormatted.test b/testlib/src/main/resources/java/forbidwildcardimports/JavaCodeNoWildcardsFormatted.test
similarity index 100%
rename from testlib/src/main/resources/java/removewildcardimports/JavaCodeNoWildcardsFormatted.test
rename to testlib/src/main/resources/java/forbidwildcardimports/JavaCodeNoWildcardsFormatted.test
diff --git a/testlib/src/main/resources/java/removewildcardimports/JavaCodeNoWildcardsUnformatted.test b/testlib/src/main/resources/java/forbidwildcardimports/JavaCodeNoWildcardsUnformatted.test
similarity index 100%
rename from testlib/src/main/resources/java/removewildcardimports/JavaCodeNoWildcardsUnformatted.test
rename to testlib/src/main/resources/java/forbidwildcardimports/JavaCodeNoWildcardsUnformatted.test
diff --git a/testlib/src/main/resources/java/removewildcardimports/JavaCodeWildcardsFormatted.test b/testlib/src/main/resources/java/forbidwildcardimports/JavaCodeWildcardsFormatted.test
similarity index 100%
rename from testlib/src/main/resources/java/removewildcardimports/JavaCodeWildcardsFormatted.test
rename to testlib/src/main/resources/java/forbidwildcardimports/JavaCodeWildcardsFormatted.test
diff --git a/testlib/src/main/resources/java/removewildcardimports/JavaCodeWildcardsUnformatted.test b/testlib/src/main/resources/java/forbidwildcardimports/JavaCodeWildcardsUnformatted.test
similarity index 100%
rename from testlib/src/main/resources/java/removewildcardimports/JavaCodeWildcardsUnformatted.test
rename to testlib/src/main/resources/java/forbidwildcardimports/JavaCodeWildcardsUnformatted.test