Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions plugin-maven/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `1.27.0`).

## [Unreleased]
### Fixed
* `skip` config key should work again now. ([#1353](https://github.com/diffplug/spotless/pull/1353) fixes [#1227](https://github.com/diffplug/spotless/issues/1227) and [#491](https://github.com/diffplug/spotless/issues/491))

## [2.27.0] - 2022-09-19
### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ public abstract class AbstractSpotlessMojo extends AbstractMojo {
@Parameter(defaultValue = "${mojoExecution.goal}", required = true, readonly = true)
private String goal;

@Parameter(defaultValue = "false")
private boolean skip;

@Parameter(property = "spotless.apply.skip", defaultValue = "false")
private boolean applySkip;

Expand Down Expand Up @@ -200,6 +203,10 @@ public final void execute() throws MojoExecutionException {
}

private boolean shouldSkip() {
if (skip) {
return true;
}

switch (goal) {
case GOAL_CHECK:
return checkSkip;
Expand All @@ -208,6 +215,7 @@ private boolean shouldSkip() {
default:
break;
}

return false;
}

Expand Down