diffplug / diffplug/spotless

LicenseHeaderStep: Support repeating placeholders

Offen
#787 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement
Vorherrschende Sprache
Java
Sterne
5.6k
Forks
559
Ø Merge
1 T. 13 Std.
Gemergte PRs (30 T.)
34

Beschreibung

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
*/
```

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.