Skip to content

Commit dc9f429

Browse files
committed
fix: maven plugin should identify skip config key
Signed-off-by: tison <[email protected]>
1 parent f4ee554 commit dc9f429

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

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

+8
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ public abstract class AbstractSpotlessMojo extends AbstractMojo {
9191
@Parameter(defaultValue = "${mojoExecution.goal}", required = true, readonly = true)
9292
private String goal;
9393

94+
@Parameter(defaultValue = "false")
95+
private boolean skip;
96+
9497
@Parameter(property = "spotless.apply.skip", defaultValue = "false")
9598
private boolean applySkip;
9699

@@ -200,6 +203,10 @@ public final void execute() throws MojoExecutionException {
200203
}
201204

202205
private boolean shouldSkip() {
206+
if (skip) {
207+
return true;
208+
}
209+
203210
switch (goal) {
204211
case GOAL_CHECK:
205212
return checkSkip;
@@ -208,6 +215,7 @@ private boolean shouldSkip() {
208215
default:
209216
break;
210217
}
218+
211219
return false;
212220
}
213221

0 commit comments

Comments
 (0)