Skip to content
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

Add a simple headerEndYear key for configuring year ranges in license headers #282

Merged
merged 1 commit into from
Oct 20, 2022

Conversation

vasilmkd
Copy link
Contributor

We're big fans of sbt-header in sbt-typelevel and would like to upstream this change that we use in our projects. It is a simple scheme for specifying an optional headerEndYear. The range resolution is done in a very simplistic way, but it goes very far in our projects.

Namely, headerEndYear is None by default, but if provided and is greater than the startYear, a range of the following format is constructed:

startYear := Some(2021)
headerEndYear := Some(2022)

results in 2021-2022 as the year range, which is then inserted into the license header as the year. In any other case, the headerEndYear is simply ignored.

Opening this PR to jumpstart a discussion. I'm of course open to making this scheme more general and I'm looking forward to proposed improvements.

Thanks in advance.

@vasilmkd
Copy link
Contributor Author

A lot of the code is added in such a way that preserves both source and binary compatibility of builds.

@hseeberger
Copy link
Member

Nice contribution! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants