spotless icon indicating copy to clipboard operation
spotless copied to clipboard

LicenseHeaderStep: Support repeating placeholders

Open joschi opened this issue 4 years ago • 1 comments

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

joschi avatar Feb 03 '21 16:02 joschi

Related to #323, but easier. No plans to implement, happy to take a PR.

nedtwigg avatar Feb 03 '21 20:02 nedtwigg