Skip to content

Commit 163ed2d

Browse files
committed
Run spotlessApply
1 parent de6d184 commit 163ed2d

File tree

2 files changed

+35
-36
lines changed

2 files changed

+35
-36
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
import com.diffplug.spotless.generic.ReplaceRegexStep;
6666
import com.diffplug.spotless.generic.ReplaceStep;
6767
import com.diffplug.spotless.generic.TrimTrailingWhitespaceStep;
68-
import com.diffplug.spotless.go.GofmtFormatStep;
6968
import com.diffplug.spotless.npm.NpmPathResolver;
7069
import com.diffplug.spotless.npm.PrettierFormatterStep;
7170
import com.diffplug.spotless.rome.BiomeFlavor;

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

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -15,43 +15,43 @@
1515
*/
1616
package com.diffplug.gradle.spotless;
1717

18+
import javax.inject.Inject;
19+
1820
import com.diffplug.spotless.FormatterStep;
1921
import com.diffplug.spotless.go.GofmtFormatStep;
2022

21-
import javax.inject.Inject;
22-
2323
public class GoExtension extends FormatExtension {
24-
public static final String NAME = "go";
25-
26-
@Inject
27-
public GoExtension(SpotlessExtension spotless) {
28-
super(spotless);
29-
}
30-
31-
public GofmtConfig gofmt() {
32-
return new GofmtConfig(GofmtFormatStep.defaultVersion());
33-
}
34-
35-
public GofmtConfig gofmt(String version) {
36-
return new GofmtConfig(version);
37-
}
38-
39-
public class GofmtConfig {
40-
GofmtFormatStep stepCfg;
41-
42-
public GofmtConfig(String version) {
43-
stepCfg = GofmtFormatStep.withVersion(version);
44-
addStep(createStep());
45-
}
46-
47-
public GofmtConfig withGoExecutable(String pathToGo) {
48-
stepCfg = stepCfg.withGoExecutable(pathToGo);
49-
replaceStep(createStep());
50-
return this;
51-
}
52-
53-
private FormatterStep createStep() {
54-
return stepCfg.create();
55-
}
56-
}
24+
public static final String NAME = "go";
25+
26+
@Inject
27+
public GoExtension(SpotlessExtension spotless) {
28+
super(spotless);
29+
}
30+
31+
public GofmtConfig gofmt() {
32+
return new GofmtConfig(GofmtFormatStep.defaultVersion());
33+
}
34+
35+
public GofmtConfig gofmt(String version) {
36+
return new GofmtConfig(version);
37+
}
38+
39+
public class GofmtConfig {
40+
GofmtFormatStep stepCfg;
41+
42+
public GofmtConfig(String version) {
43+
stepCfg = GofmtFormatStep.withVersion(version);
44+
addStep(createStep());
45+
}
46+
47+
public GofmtConfig withGoExecutable(String pathToGo) {
48+
stepCfg = stepCfg.withGoExecutable(pathToGo);
49+
replaceStep(createStep());
50+
return this;
51+
}
52+
53+
private FormatterStep createStep() {
54+
return stepCfg.create();
55+
}
56+
}
5757
}

0 commit comments

Comments
 (0)