Skip to content

Commit

Permalink
PalantirJavaFormat in plugin-maven takes style parameter (#1694)
Browse files Browse the repository at this point in the history
  • Loading branch information
nedtwigg authored May 10, 2023
2 parents 5e75cb1 + 22ad0b6 commit 487da17
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
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
* `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
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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());
}
}

0 comments on commit 487da17

Please sign in to comment.