-
-
Notifications
You must be signed in to change notification settings - Fork 89
Description
Describe the feature
Support regex (or other kind of) patterns in templates to match slight variation in the copyright headers.
In Eclipse hawkBit Project we use the plugin to check the licenses. The licenses are general EPL 2.0 but every year they are changed. So, their first line is changed, e.g.:
Copyright (c) 2023 Contributors to the Eclipse Foundation
Copyright (c) 2024 Contributors to the Eclipse Foundation
So, we need to change the default template's year and to add previous template in validHeaders each year. That leads to many license validHeaders and need to maintain licenses each year.
I'd like to have support for something like:
Copyright (c) ${(\d{4}} Contributors to the Eclipse Foundation
or
Copyright (c) ${(regex:\d{4}} Contributors to the Eclipse Foundation
or
Copyright (c) ${(any.date} Contributors to the Eclipse Foundation
Then we could use same header template each year. It would be perfect if we could template with regex other parts of the license like "others".
Any alternative you've considered ?
We use multiple headers which introduce much boilerplate text.