diff --git a/plugin-maven/CHANGES.md b/plugin-maven/CHANGES.md index df994a2b44..c00aeda138 100644 --- a/plugin-maven/CHANGES.md +++ b/plugin-maven/CHANGES.md @@ -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 +* `palantir` step now accepts a `style` parameter, which is documentation had already claimed to do. ([#1694](https://github.com/diffplug/spotless/pull/1694)) ## [2.36.0] - 2023-04-06 ### Added diff --git a/plugin-maven/src/main/java/com/diffplug/spotless/maven/java/PalantirJavaFormat.java b/plugin-maven/src/main/java/com/diffplug/spotless/maven/java/PalantirJavaFormat.java index df58764c1d..192588d85d 100644 --- a/plugin-maven/src/main/java/com/diffplug/spotless/maven/java/PalantirJavaFormat.java +++ b/plugin-maven/src/main/java/com/diffplug/spotless/maven/java/PalantirJavaFormat.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2022 DiffPlug + * Copyright 2016-2023 DiffPlug * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,9 +27,13 @@ public class PalantirJavaFormat implements FormatterStepFactory { @Parameter private String version; + @Parameter + private String style; + @Override public FormatterStep newFormatterStep(FormatterStepConfig config) { String version = this.version != null ? this.version : PalantirJavaFormatStep.defaultVersion(); - return PalantirJavaFormatStep.create(version, config.getProvisioner()); + String style = this.style != null ? this.style : PalantirJavaFormatStep.defaultStyle(); + return PalantirJavaFormatStep.create(version, style, config.getProvisioner()); } }