-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make license checks more relaxed #11
Comments
So essentially you want the What would happen if you make other changes to the license template? Would it then update all license headers to the current year? |
Correct. If I create a new file today, I want it to get today's year. However, I don't want to touch any other existing files created last year.
Not getting too many ideas at present, but perhaps an option to forcibly update all licenses might do the trick. |
Hmm. After running the update task, all headers should be in a valid state. So I'd rather not skip some headers. However, if we consider other years as valid, then updating would only make changes if you make other changes to the license template (e.g. if you switch to another license). In this case, all years would be reset to the current year. If that's fine for you, I can imagine adding such a feature. Although I'm not entirely sure what's the best way to exclude a variable from the check. I will think about it for a while. |
Yeah that's fine by me 👍 |
Throwing a +1 on this, as it would be quite useful. |
Is there anyway to make the license checks a bit more relaxed? For instance, ignore parts of the template based on some condition / expression. We have a large number of source files which were created in 2018 with a header containing the copyright year as follows:
This is generated using the template
Now starting 1/1/2019, all our builds are failing because the year in the file header does not match the current year. So we're left with two unattractive options now:
ignoreFailures = true
but this is a bit brute force and it doesn't fail the build when there are new files without license headers.My proposal is have a separate DSL for configuring the checks where we can specifically exclude certain variables from it. To start with, maybe something like:
Appreciate the time and effort you have put into this plugin.
The text was updated successfully, but these errors were encountered: