Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix license header bug for years in range #840

Merged
merged 3 commits into from
Apr 12, 2021
Merged

Conversation

bugsaw
Copy link
Contributor

@bugsaw bugsaw commented Apr 10, 2021

Added new field in LicenseHeaderStep:

  • licenseHeaderWithRange

When license header contains range years then calculateYearExact
should return only second year in range

Should prevent the plugin from changing 2011-2020 to 2011-2011-2020 if the range of years is specified in the license file.

Added new field in LicenseHeaderStep:
- licenseHeaderWithRange

When license header contains range years then calculateYearExact
should return only second year in range
@bugsaw
Copy link
Contributor Author

bugsaw commented Apr 11, 2021

all tests passed, and this is the result of the test on the master branch:

org.junit.ComparisonFailure: Step application failed expected:<... with range, 2009-20[]21. ACME corp.
**/
...> but was:<... with range, 2009-20[15-20]21. ACME corp.
**/
...>

Copy link
Member

@nedtwigg nedtwigg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, great fix! Copy the changelog entry to plugin-gradle/CHANGES and plugin-maven/CHANGES and I'll merge and release.

@bugsaw bugsaw requested a review from nedtwigg April 11, 2021 21:47
@nedtwigg nedtwigg merged commit 959d6b7 into diffplug:main Apr 12, 2021
@nedtwigg
Copy link
Member

Thanks! Published in plugin-gradle 5.12.1 and plugin-maven 2.10.1.

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

Successfully merging this pull request may close these issues.

2 participants