Skip to content

Commit e4b8f30

Browse files
committed
Revert "fix: separate node_modules dir per npm based formatter"
This reverts commit da3b75b.
1 parent 0f50012 commit e4b8f30

File tree

15 files changed

+52
-163
lines changed

15 files changed

+52
-163
lines changed

lib/src/main/java/com/diffplug/spotless/npm/EslintFormatterStep.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2025 DiffPlug
2+
* Copyright 2016-2024 DiffPlug
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -68,14 +68,13 @@ public static Map<String, String> defaultDevDependenciesWithEslint(String versio
6868
return Collections.singletonMap("eslint", version);
6969
}
7070

71-
public static FormatterStep create(String formatName, Map<String, String> devDependencies, Provisioner provisioner, File projectDir, File buildDir, File cacheDir, NpmPathResolver npmPathResolver, EslintConfig eslintConfig) {
71+
public static FormatterStep create(Map<String, String> devDependencies, Provisioner provisioner, File projectDir, File buildDir, File cacheDir, NpmPathResolver npmPathResolver, EslintConfig eslintConfig) {
7272
requireNonNull(devDependencies);
7373
requireNonNull(provisioner);
7474
requireNonNull(projectDir);
7575
requireNonNull(buildDir);
76-
final String prefixedName = String.format("%s-%s", formatName, NAME);
77-
return FormatterStep.createLazy(prefixedName,
78-
() -> new State(prefixedName, devDependencies, projectDir, buildDir, cacheDir, npmPathResolver, eslintConfig),
76+
return FormatterStep.createLazy(NAME,
77+
() -> new State(NAME, devDependencies, projectDir, buildDir, cacheDir, npmPathResolver, eslintConfig),
7978
State::createFormatterFunc);
8079
}
8180

lib/src/main/java/com/diffplug/spotless/npm/NpmFormatterStepStateBase.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2025 DiffPlug
2+
* Copyright 2016-2024 DiffPlug
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -69,7 +69,7 @@ public static class Runtime {
6969

7070
Runtime(NpmFormatterStepStateBase parent) {
7171
this.parent = parent;
72-
this.nodeServerLayout = new NodeServerLayout(new File(parent.locations.buildDir(), parent.stepName), parent.npmConfig.getPackageJsonContent());
72+
this.nodeServerLayout = new NodeServerLayout(parent.locations.buildDir(), parent.npmConfig.getPackageJsonContent());
7373
this.nodeServeApp = new NodeServeApp(nodeServerLayout, parent.npmConfig, parent.locations);
7474
}
7575

lib/src/main/java/com/diffplug/spotless/npm/PrettierFormatterStep.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2025 DiffPlug
2+
* Copyright 2016-2024 DiffPlug
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -51,13 +51,12 @@ public static final Map<String, String> defaultDevDependenciesWithPrettier(Strin
5151
return Collections.singletonMap("prettier", version);
5252
}
5353

54-
public static FormatterStep create(String formatName, Map<String, String> devDependencies, Provisioner provisioner, File projectDir, File buildDir, File cacheDir, NpmPathResolver npmPathResolver, PrettierConfig prettierConfig) {
54+
public static FormatterStep create(Map<String, String> devDependencies, Provisioner provisioner, File projectDir, File buildDir, File cacheDir, NpmPathResolver npmPathResolver, PrettierConfig prettierConfig) {
5555
requireNonNull(devDependencies);
5656
requireNonNull(provisioner);
5757
requireNonNull(buildDir);
58-
final String prefixedName = String.format("%s-%s", formatName, NAME);
59-
return FormatterStep.createLazy(prefixedName,
60-
() -> new State(prefixedName, devDependencies, projectDir, buildDir, cacheDir, npmPathResolver, prettierConfig),
58+
return FormatterStep.createLazy(NAME,
59+
() -> new State(NAME, devDependencies, projectDir, buildDir, cacheDir, npmPathResolver, prettierConfig),
6160
State::createFormatterFunc);
6261
}
6362

plugin-gradle/src/main/java/com/diffplug/gradle/spotless/FormatExtension.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,7 @@ public PrettierConfig config(final Map<String, Object> prettierConfig) {
798798
@Override
799799
protected FormatterStep createStep() {
800800
final Project project = getProject();
801-
return PrettierFormatterStep.create(formatName(), devDependencies, provisioner(), project.getProjectDir(),
801+
return PrettierFormatterStep.create(devDependencies, provisioner(), project.getProjectDir(),
802802
project.getLayout().getBuildDirectory().getAsFile().get(), npmModulesCacheOrNull(),
803803
new NpmPathResolver(npmFileOrNull(), nodeFileOrNull(), npmrcFileOrNull(),
804804
Arrays.asList(project.getProjectDir(), project.getRootDir())),

plugin-gradle/src/main/java/com/diffplug/gradle/spotless/JavascriptExtension.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2025 DiffPlug
2+
* Copyright 2016-2024 DiffPlug
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -106,7 +106,7 @@ public JavascriptEslintConfig(Map<String, String> devDependencies) {
106106
public FormatterStep createStep() {
107107
final Project project = getProject();
108108

109-
return EslintFormatterStep.create(NAME, devDependencies, provisioner(), project.getProjectDir(),
109+
return EslintFormatterStep.create(devDependencies, provisioner(), project.getProjectDir(),
110110
project.getLayout().getBuildDirectory().getAsFile().get(), npmModulesCacheOrNull(),
111111
new NpmPathResolver(npmFileOrNull(), nodeFileOrNull(), npmrcFileOrNull(),
112112
Arrays.asList(project.getProjectDir(), project.getRootDir())),

plugin-gradle/src/main/java/com/diffplug/gradle/spotless/TypescriptExtension.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2025 DiffPlug
2+
* Copyright 2016-2024 DiffPlug
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -214,7 +214,7 @@ public TypescriptEslintConfig tsconfigFile(Object path) {
214214
public FormatterStep createStep() {
215215
final Project project = getProject();
216216

217-
return EslintFormatterStep.create(NAME, devDependencies, provisioner(), project.getProjectDir(),
217+
return EslintFormatterStep.create(devDependencies, provisioner(), project.getProjectDir(),
218218
project.getLayout().getBuildDirectory().getAsFile().get(), npmModulesCacheOrNull(),
219219
new NpmPathResolver(npmFileOrNull(), nodeFileOrNull(), npmrcFileOrNull(),
220220
Arrays.asList(project.getProjectDir(), project.getRootDir())),

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

Lines changed: 19 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2025 DiffPlug
2+
* Copyright 2016-2024 DiffPlug
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -15,18 +15,10 @@
1515
*/
1616
package com.diffplug.gradle.spotless;
1717

18-
import static org.assertj.core.api.Assertions.assertThat;
19-
20-
import java.io.File;
2118
import java.io.IOException;
22-
import java.nio.file.Files;
23-
import java.nio.file.Path;
24-
import java.util.List;
25-
import java.util.stream.Collectors;
26-
import java.util.stream.Stream;
2719

20+
import org.assertj.core.api.Assertions;
2821
import org.gradle.testkit.runner.BuildResult;
29-
import org.junit.jupiter.api.Test;
3022
import org.junit.jupiter.params.ParameterizedTest;
3123
import org.junit.jupiter.params.provider.ValueSource;
3224

@@ -59,7 +51,7 @@ void useInlineConfig(String prettierVersion) throws IOException {
5951
"}");
6052
setFile("test.ts").toResource("npm/prettier/config/typescript.dirty");
6153
final BuildResult spotlessApply = gradleRunner().withArguments("--stacktrace", "spotlessApply").build();
62-
assertThat(spotlessApply.getOutput()).contains("BUILD SUCCESSFUL");
54+
Assertions.assertThat(spotlessApply.getOutput()).contains("BUILD SUCCESSFUL");
6355
switch (prettierVersion) {
6456
case PRETTIER_VERSION_2:
6557
assertFile("test.ts").sameAsResource("npm/prettier/config/typescript.configfile_prettier_2.clean");
@@ -89,7 +81,7 @@ void verifyCleanSpotlessCheckWorks(String prettierVersion) throws IOException {
8981
"}");
9082
setFile("test.ts").toResource("npm/prettier/config/typescript.dirty");
9183
final BuildResult spotlessCheckFailsGracefully = gradleRunner().withArguments("--stacktrace", "spotlessCheck").buildAndFail();
92-
assertThat(spotlessCheckFailsGracefully.getOutput()).contains("> The following files had format violations:");
84+
Assertions.assertThat(spotlessCheckFailsGracefully.getOutput()).contains("> The following files had format violations:");
9385

9486
gradleRunner().withArguments("--stacktrace", "spotlessApply").build();
9587
gradleRunner().withArguments("--stacktrace", "spotlessCheck").build();
@@ -112,7 +104,7 @@ void useFileConfig(String prettierVersion) throws IOException {
112104
"}");
113105
setFile("test.ts").toResource("npm/prettier/config/typescript.dirty");
114106
final BuildResult spotlessApply = gradleRunner().withArguments("--stacktrace", "spotlessApply").build();
115-
assertThat(spotlessApply.getOutput()).contains("BUILD SUCCESSFUL");
107+
Assertions.assertThat(spotlessApply.getOutput()).contains("BUILD SUCCESSFUL");
116108
switch (prettierVersion) {
117109
case PRETTIER_VERSION_2:
118110
assertFile("test.ts").sameAsResource("npm/prettier/config/typescript.configfile_prettier_2.clean");
@@ -139,7 +131,7 @@ void chooseParserBasedOnFilename(String prettierVersion) throws IOException {
139131
"}");
140132
setFile("dirty.json").toResource("npm/prettier/filename/dirty.json");
141133
final BuildResult spotlessApply = gradleRunner().withArguments("--stacktrace", "spotlessApply").build();
142-
assertThat(spotlessApply.getOutput()).contains("BUILD SUCCESSFUL");
134+
Assertions.assertThat(spotlessApply.getOutput()).contains("BUILD SUCCESSFUL");
143135
assertFile("dirty.json").sameAsResource("npm/prettier/filename/clean.json");
144136
}
145137

@@ -177,7 +169,7 @@ void useJavaCommunityPlugin(String prettierVersion) throws IOException {
177169
"}");
178170
setFile("JavaTest.java").toResource("npm/prettier/plugins/java-test.dirty");
179171
final BuildResult spotlessApply = gradleRunner().withArguments("--stacktrace", "spotlessApply").build();
180-
assertThat(spotlessApply.getOutput()).contains("BUILD SUCCESSFUL");
172+
Assertions.assertThat(spotlessApply.getOutput()).contains("BUILD SUCCESSFUL");
181173
assertFile("JavaTest.java").sameAsResource("npm/prettier/plugins/java-test.clean");
182174
}
183175

@@ -210,7 +202,7 @@ void useJavaCommunityPluginFileConfig(String prettierVersion) throws IOException
210202
"}");
211203
setFile("JavaTest.java").toResource("npm/prettier/plugins/java-test.dirty");
212204
final BuildResult spotlessApply = gradleRunner().withArguments("--stacktrace", "spotlessApply").build();
213-
assertThat(spotlessApply.getOutput()).contains("BUILD SUCCESSFUL");
205+
Assertions.assertThat(spotlessApply.getOutput()).contains("BUILD SUCCESSFUL");
214206
assertFile("JavaTest.java").sameAsResource("npm/prettier/plugins/java-test.clean");
215207
}
216208

@@ -234,8 +226,8 @@ void suggestsMissingJavaCommunityPlugin(String prettierVersion) throws IOExcepti
234226
"}");
235227
setFile("JavaTest.java").toResource("npm/prettier/plugins/java-test.dirty");
236228
final BuildResult spotlessApply = gradleRunner().withArguments("--stacktrace", "spotlessApply").buildAndFail();
237-
assertThat(spotlessApply.getOutput()).contains("Could not infer a parser");
238-
assertThat(spotlessApply.getOutput()).contains("prettier-plugin-java");
229+
Assertions.assertThat(spotlessApply.getOutput()).contains("Could not infer a parser");
230+
Assertions.assertThat(spotlessApply.getOutput()).contains("prettier-plugin-java");
239231
}
240232

241233
@ParameterizedTest(name = "{index}: usePhpCommunityPlugin with prettier {0}")
@@ -272,7 +264,7 @@ void usePhpCommunityPlugin(String prettierVersion) throws IOException {
272264
"}");
273265
setFile("php-example.php").toResource("npm/prettier/plugins/php.dirty");
274266
final BuildResult spotlessApply = gradleRunner().withArguments("--stacktrace", "spotlessApply").build();
275-
assertThat(spotlessApply.getOutput()).contains("BUILD SUCCESSFUL");
267+
Assertions.assertThat(spotlessApply.getOutput()).contains("BUILD SUCCESSFUL");
276268
assertFile("php-example.php").sameAsResource("npm/prettier/plugins/php.clean");
277269
}
278270

@@ -332,9 +324,9 @@ void usePhpAndJavaCommunityPlugin(String prettierVersion) throws IOException {
332324
setFile("php-example.php").toResource("npm/prettier/plugins/php.dirty");
333325
setFile("JavaTest.java").toResource("npm/prettier/plugins/java-test.dirty");
334326
final BuildResult spotlessApply = gradleRunner().forwardOutput().withArguments("--stacktrace", "--info", "spotlessApply").build();
335-
assertThat(spotlessApply.getOutput()).contains("BUILD SUCCESSFUL");
327+
Assertions.assertThat(spotlessApply.getOutput()).contains("BUILD SUCCESSFUL");
336328
final BuildResult spotlessApply2 = gradleRunner().forwardOutput().withArguments("--stacktrace", "--info", "spotlessApply").build();
337-
assertThat(spotlessApply2.getOutput()).contains("BUILD SUCCESSFUL");
329+
Assertions.assertThat(spotlessApply2.getOutput()).contains("BUILD SUCCESSFUL");
338330
assertFile("php-example.php").sameAsResource("npm/prettier/plugins/php.clean");
339331
assertFile("JavaTest.java").sameAsResource("npm/prettier/plugins/java-test.clean");
340332
}
@@ -363,7 +355,7 @@ void autodetectNpmrcFileConfig(String prettierVersion) throws IOException {
363355
"}");
364356
setFile("test.ts").toResource("npm/prettier/config/typescript.dirty");
365357
final BuildResult spotlessApply = gradleRunner().withArguments("--stacktrace", "spotlessApply").buildAndFail();
366-
assertThat(spotlessApply.getOutput()).containsPattern("Running npm command.*npm install.* failed with exit code: 1");
358+
Assertions.assertThat(spotlessApply.getOutput()).containsPattern("Running npm command.*npm install.* failed with exit code: 1");
367359
}
368360

369361
@ParameterizedTest(name = "{index}: verifyCleanAndSpotlessWorks with prettier {0}")
@@ -385,9 +377,9 @@ void verifyCleanAndSpotlessWorks(String prettierVersion) throws IOException {
385377
"}");
386378
setFile("test.ts").toResource("npm/prettier/config/typescript.dirty");
387379
final BuildResult spotlessApply = gradleRunner().withArguments("--stacktrace", "clean", "spotlessApply").build();
388-
assertThat(spotlessApply.getOutput()).contains("BUILD SUCCESSFUL");
380+
Assertions.assertThat(spotlessApply.getOutput()).contains("BUILD SUCCESSFUL");
389381
final BuildResult spotlessApply2 = gradleRunner().withArguments("--stacktrace", "clean", "spotlessApply").build();
390-
assertThat(spotlessApply2.getOutput()).contains("BUILD SUCCESSFUL");
382+
Assertions.assertThat(spotlessApply2.getOutput()).contains("BUILD SUCCESSFUL");
391383
}
392384

393385
@ParameterizedTest(name = "{index}: verifyCleanAndSpotlessWithNpmInstallCacheWorks with prettier {0}")
@@ -409,9 +401,9 @@ void verifyCleanAndSpotlessWithNpmInstallCacheWorks(String prettierVersion) thro
409401
"}");
410402
setFile("test.ts").toResource("npm/prettier/config/typescript.dirty");
411403
final BuildResult spotlessApply = gradleRunner().withArguments("--stacktrace", "clean", "spotlessApply").build();
412-
assertThat(spotlessApply.getOutput()).contains("BUILD SUCCESSFUL");
404+
Assertions.assertThat(spotlessApply.getOutput()).contains("BUILD SUCCESSFUL");
413405
final BuildResult spotlessApply2 = gradleRunner().withArguments("--stacktrace", "clean", "spotlessApply").build();
414-
assertThat(spotlessApply2.getOutput()).contains("BUILD SUCCESSFUL");
406+
Assertions.assertThat(spotlessApply2.getOutput()).contains("BUILD SUCCESSFUL");
415407
}
416408

417409
@ParameterizedTest(name = "{index}: autodetectNpmrcFileConfig with prettier {0}")
@@ -438,51 +430,6 @@ void pickupNpmrcFileConfig(String prettierVersion) throws IOException {
438430
"}");
439431
setFile("test.ts").toResource("npm/prettier/config/typescript.dirty");
440432
final BuildResult spotlessApply = gradleRunner().withArguments("--stacktrace", "spotlessApply").buildAndFail();
441-
assertThat(spotlessApply.getOutput()).containsPattern("Running npm command.*npm install.* failed with exit code: 1");
442-
}
443-
444-
@Test
445-
void multiplePrettierSetupsDoNotIntersectOnNpmDir() throws IOException {
446-
setFile("build.gradle").toLines(
447-
"plugins {",
448-
" id 'com.diffplug.spotless'",
449-
"}",
450-
"repositories { mavenCentral() }",
451-
"def prettierConfig = [:]",
452-
"prettierConfig['printWidth'] = 120",
453-
"spotless {",
454-
" format 'mytypescript', {",
455-
" target 'test.ts'",
456-
" prettier().config(prettierConfig)",
457-
" }",
458-
" format 'json', {",
459-
" target 'test.json'",
460-
" prettier().config(prettierConfig)",
461-
" }",
462-
" javascript {",
463-
" target 'test.js'",
464-
" prettier().config(prettierConfig)",
465-
" }",
466-
"}");
467-
468-
setFile("test.ts").toResource("npm/prettier/config/typescript.dirty");
469-
setFile("test.json").toResource("npm/prettier/filetypes/json/json.dirty");
470-
setFile("test.js").toResource("npm/prettier/filetypes/javascript-es5/javascript-es5.dirty");
471-
472-
final BuildResult spotlessApply = gradleRunner().withArguments("--stacktrace", "spotlessApply").build();
473-
assertThat(spotlessApply.getOutput()).contains("BUILD SUCCESSFUL");
474-
475-
File buildFolder = new File(rootFolder(), "build");
476-
assertThat(buildFolder).isNotEmptyDirectory();
477-
478-
// verify it contains 3 folders containing "spotless-prettier" in it (recursively) - one for each format
479-
try (Stream<Path> pathStream = Files.walk(buildFolder.toPath())) {
480-
List<Path> nodeModulesDirs = pathStream
481-
.sorted()
482-
.filter(Files::isDirectory)
483-
.filter(path -> path.getFileName().toString().contains("spotless-prettier"))
484-
.collect(Collectors.toList());
485-
assertThat(nodeModulesDirs).hasSize(3);
486-
}
433+
Assertions.assertThat(spotlessApply.getOutput()).containsPattern("Running npm command.*npm install.* failed with exit code: 1");
487434
}
488435
}

plugin-maven/src/main/java/com/diffplug/spotless/maven/FormatterFactory.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2025 DiffPlug
2+
* Copyright 2016-2024 DiffPlug
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -83,12 +83,12 @@ public final Set<String> excludes() {
8383
return excludes == null ? emptySet() : Sets.newHashSet(excludes);
8484
}
8585

86-
public final Formatter newFormatter(Supplier<Iterable<File>> filesToFormat, FormatterConfig config, int formatterIndex) {
86+
public final Formatter newFormatter(Supplier<Iterable<File>> filesToFormat, FormatterConfig config) {
8787
Charset formatterEncoding = encoding(config);
8888
LineEnding formatterLineEndings = lineEndings(config);
8989
LineEnding.Policy formatterLineEndingPolicy = formatterLineEndings.createPolicy(config.getFileLocator().getBaseDir(), filesToFormat);
9090

91-
FormatterStepConfig stepConfig = stepConfig(formatterEncoding, config, formatterIndex);
91+
FormatterStepConfig stepConfig = stepConfig(formatterEncoding, config);
9292
List<FormatterStepFactory> factories = gatherStepFactories(config.getGlobalStepFactories(), stepFactories);
9393

9494
List<FormatterStep> formatterSteps = factories.stream()
@@ -174,8 +174,8 @@ Optional<String> ratchetFrom(FormatterConfig config) {
174174
}
175175
}
176176

177-
private FormatterStepConfig stepConfig(Charset encoding, FormatterConfig config, int formatterIndex) {
178-
return new FormatterStepConfig(encoding, licenseHeaderDelimiter(), ratchetFrom(config), config.getProvisioner(), config.getFileLocator(), config.getSpotlessSetLicenseHeaderYearsFromGitHistory(), String.format("%s-%d", "formatter", formatterIndex));
177+
private FormatterStepConfig stepConfig(Charset encoding, FormatterConfig config) {
178+
return new FormatterStepConfig(encoding, licenseHeaderDelimiter(), ratchetFrom(config), config.getProvisioner(), config.getFileLocator(), config.getSpotlessSetLicenseHeaderYearsFromGitHistory());
179179
}
180180

181181
private static List<FormatterStepFactory> gatherStepFactories(List<FormatterStepFactory> allGlobal, List<FormatterStepFactory> allConfigured) {

plugin-maven/src/main/java/com/diffplug/spotless/maven/FormatterStepConfig.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2025 DiffPlug
2+
* Copyright 2016-2020 DiffPlug
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -28,16 +28,14 @@ public class FormatterStepConfig {
2828
private final Provisioner provisioner;
2929
private final FileLocator fileLocator;
3030
private final Optional<String> spotlessSetLicenseHeaderYearsFromGitHistory;
31-
private final String name;
3231

33-
public FormatterStepConfig(Charset encoding, String licenseHeaderDelimiter, Optional<String> ratchetFrom, Provisioner provisioner, FileLocator fileLocator, Optional<String> spotlessSetLicenseHeaderYearsFromGitHistory, String name) {
32+
public FormatterStepConfig(Charset encoding, String licenseHeaderDelimiter, Optional<String> ratchetFrom, Provisioner provisioner, FileLocator fileLocator, Optional<String> spotlessSetLicenseHeaderYearsFromGitHistory) {
3433
this.encoding = encoding;
3534
this.licenseHeaderDelimiter = licenseHeaderDelimiter;
3635
this.ratchetFrom = ratchetFrom;
3736
this.provisioner = provisioner;
3837
this.fileLocator = fileLocator;
3938
this.spotlessSetLicenseHeaderYearsFromGitHistory = spotlessSetLicenseHeaderYearsFromGitHistory;
40-
this.name = name;
4139
}
4240

4341
public Charset getEncoding() {
@@ -63,8 +61,4 @@ public FileLocator getFileLocator() {
6361
public Optional<String> spotlessSetLicenseHeaderYearsFromGitHistory() {
6462
return spotlessSetLicenseHeaderYearsFromGitHistory;
6563
}
66-
67-
public String getName() {
68-
return name;
69-
}
7064
}

0 commit comments

Comments
 (0)