diffplug / diffplug/spotless

LicenseHeaderStep: Support repeating placeholders

オープン
#787 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
enhancement
主要言語
Java
スター
5.6k
フォーク
559
平均マージ
1日 13時間
マージ済み PR(30日)
34

説明

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

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。