Skip to content

Commit 2f45f98

Browse files
committed
rename parameters to have a m2e prefix
1 parent 144b173 commit 2f45f98

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

plugin-maven/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1703,7 +1703,7 @@ To enable it use the following parameter
17031703

17041704
```
17051705
<configuration>
1706-
<enableForIncrementalBuild>true</enableForIncrementalBuild><!-- this is false by default -->
1706+
<m2eEnableForIncrementalBuild>true</m2eEnableForIncrementalBuild><!-- this is false by default -->
17071707
</configuration>
17081708
```
17091709

@@ -1712,7 +1712,7 @@ You can adjust this with
17121712

17131713
```
17141714
<configuration>
1715-
<incrementalBuildMessageSeverity>ERROR</incrementalBuildMessageSeverity><!-- WARNING or ERROR -->
1715+
<m2eIncrementalBuildMessageSeverity>ERROR</m2eIncrementalBuildMessageSeverity><!-- WARNING or ERROR -->
17161716
</configuration>
17171717
```
17181718

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ public abstract class AbstractSpotlessMojo extends AbstractMojo {
206206
* Otherwise this goal is skipped in incremental builds and only runs on full builds.
207207
*/
208208
@Parameter(defaultValue = "false")
209-
protected boolean enableForIncrementalBuild;
209+
protected boolean m2eEnableForIncrementalBuild;
210210

211211
protected abstract void process(Iterable<File> files, Formatter formatter, UpToDateChecker upToDateChecker) throws MojoExecutionException;
212212

@@ -252,7 +252,7 @@ private boolean shouldSkip() {
252252
if (skip) {
253253
return true;
254254
}
255-
if (buildContext.isIncremental() && !enableForIncrementalBuild) {
255+
if (buildContext.isIncremental() && !m2eEnableForIncrementalBuild) {
256256
getLog().debug("Skipping for incremental builds as parameter 'enableForIncrementalBuilds' is set to 'false'");
257257
return true;
258258
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ public int getSeverity() {
5858
/**
5959
* The severity used to emit messages during incremental builds.
6060
* Either {@code WARNING} or {@code ERROR}.
61-
* @see AbstractSpotlessMojo#enableForIncrementalBuild
61+
* @see AbstractSpotlessMojo#m2eEnableForIncrementalBuild
6262
*/
6363
@Parameter(defaultValue = "WARNING")
64-
private MessageSeverity incrementalBuildMessageSeverity;
64+
private MessageSeverity m2eIncrementalBuildMessageSeverity;
6565

6666
@Override
6767
protected void process(Iterable<File> files, Formatter formatter, UpToDateChecker upToDateChecker) throws MojoExecutionException {
@@ -83,7 +83,7 @@ protected void process(Iterable<File> files, Formatter formatter, UpToDateChecke
8383
problemFiles.add(file);
8484
if (buildContext.isIncremental()) {
8585
Map.Entry<Integer, String> diffEntry = DiffMessageFormatter.diff(formatter, file);
86-
buildContext.addMessage(file, diffEntry.getKey() + 1, 0, INCREMENTAL_MESSAGE_PREFIX + diffEntry.getValue(), incrementalBuildMessageSeverity.getSeverity(), null);
86+
buildContext.addMessage(file, diffEntry.getKey() + 1, 0, INCREMENTAL_MESSAGE_PREFIX + diffEntry.getValue(), m2eIncrementalBuildMessageSeverity.getSeverity(), null);
8787
}
8888
counter.cleaned();
8989
} else {

0 commit comments

Comments
 (0)