Skip to content

Commit 487da17

Browse files
authored
PalantirJavaFormat in plugin-maven takes style parameter (#1694)
2 parents 5e75cb1 + 22ad0b6 commit 487da17

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

plugin-maven/CHANGES.md

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `1.27.0`).
44

55
## [Unreleased]
6+
### Fixed
7+
* `palantir` step now accepts a `style` parameter, which is documentation had already claimed to do. ([#1694](https://github.com/diffplug/spotless/pull/1694))
68

79
## [2.36.0] - 2023-04-06
810
### Added

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

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2022 DiffPlug
2+
* Copyright 2016-2023 DiffPlug
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -27,9 +27,13 @@ public class PalantirJavaFormat implements FormatterStepFactory {
2727
@Parameter
2828
private String version;
2929

30+
@Parameter
31+
private String style;
32+
3033
@Override
3134
public FormatterStep newFormatterStep(FormatterStepConfig config) {
3235
String version = this.version != null ? this.version : PalantirJavaFormatStep.defaultVersion();
33-
return PalantirJavaFormatStep.create(version, config.getProvisioner());
36+
String style = this.style != null ? this.style : PalantirJavaFormatStep.defaultStyle();
37+
return PalantirJavaFormatStep.create(version, style, config.getProvisioner());
3438
}
3539
}

0 commit comments

Comments
 (0)