diffplug / diffplug/spotless

LicenseHeaderStep: Support repeating placeholders

Open
#787 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
5.6k
Forks
559
Avg merge
1d 13h
Merged PRs (30d)
34

Description

We have the case of requiring multiple copyright years in our license headers for our source files.

Example:
```
/*
* (c) Copyright CompanyA Inc., 2010-2020
* (c) Copyright CompanyB Inc., 2020-2021
*/
```

Currently the `LicenseHeaderStep` only supports replacing/updating the placeholder for the year (`$YEAR` or `$today.year`) only a single time.

Using this template:
```
/*
* (c) Copyright CompanyA Inc., $YEAR
* (c) Copyright CompanyB Inc., $YEAR
*/
```

The result would be as follows:
```
/*
* (c) Copyright CompanyA Inc., 2010-2020
* (c) Copyright CompanyB Inc., $YEAR
*/
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.