Skip to content

Commit 3a3583b

Browse files
committed
add maven support
1 parent cf8bc08 commit 3a3583b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

lib/src/main/java/com/diffplug/spotless/generic/LicenseHeaderStep.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public LicenseHeaderStep withYearModeLazy(Supplier<YearMode> yearMode) {
108108
return new LicenseHeaderStep(name, contentPattern, headerLazy, delimiter, yearSeparator, yearMode, skipLinesMatching);
109109
}
110110

111-
public LicenseHeaderStep withSkipLinesMatching(String skipLinesMatching) {
111+
public LicenseHeaderStep withSkipLinesMatching(@Nullable String skipLinesMatching) {
112112
return new LicenseHeaderStep(name, contentPattern, headerLazy, delimiter, yearSeparator, yearMode, skipLinesMatching);
113113
}
114114

plugin-maven/src/main/java/com/diffplug/spotless/maven/generic/LicenseHeader.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ public class LicenseHeader implements FormatterStepFactory {
3737
@Parameter
3838
private String delimiter;
3939

40+
@Parameter
41+
private String skipLinesMatching;
42+
4043
@Override
4144
public final FormatterStep newFormatterStep(FormatterStepConfig config) {
4245
String delimiterString = delimiter != null ? delimiter : config.getLicenseHeaderDelimiter();
@@ -53,6 +56,7 @@ public final FormatterStep newFormatterStep(FormatterStepConfig config) {
5356
}
5457
return LicenseHeaderStep.headerDelimiter(() -> readFileOrContent(config), delimiterString)
5558
.withYearMode(yearMode)
59+
.withSkipLinesMatching(skipLinesMatching)
5660
.build()
5761
.filterByFile(LicenseHeaderStep.unsupportedJvmFilesFilter());
5862
} else {

0 commit comments

Comments
 (0)