Skip to content

Commit 87f24b7

Browse files
authored
Remove the removeFormat method (#979 fixes #653)
2 parents ea6344e + 02e8b1c commit 87f24b7

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

plugin-gradle/CHANGES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
1717
* **BREAKING** `createIndepentApplyTask(String taskName)` now requires that `taskName` does not end with `Apply`
1818
* Bump minimum required Gradle from `6.1` to `6.1.1`.
1919
20+
### Removed
21+
* **BREAKING** `removeFormat` (which has been broken since `5.0`) has been removed. Use `clearSteps()` as a workaround ([#653](https://github.com/diffplug/spotless/issues/653)).
22+
2023
## [5.17.1] - 2021-10-26
2124
### Changed
2225
* Added support and bump Eclipse formatter default versions to `4.21` for `eclipse-groovy`. Change is only applied for JVM 11+.

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

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -182,15 +182,6 @@ public void format(String name, Action<FormatExtension> closure) {
182182
format(name, FormatExtension.class, closure);
183183
}
184184

185-
/** Makes it possible to remove a format which was created earlier. */
186-
public void removeFormat(String name) {
187-
requireNonNull(name);
188-
FormatExtension toRemove = formats.remove(name);
189-
if (toRemove == null) {
190-
project.getLogger().warn("Called removeFormat('" + name + "') but there was no such format.");
191-
}
192-
}
193-
194185
boolean enforceCheck = true;
195186

196187
/** Returns {@code true} if Gradle's {@code check} task should run {@code spotlessCheck}; {@code false} otherwise. */

0 commit comments

Comments
 (0)