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

Refactor the public API of LicenseHeaderStep #628

Merged
merged 7 commits into from
Jun 30, 2020
Merged

Conversation

nedtwigg
Copy link
Member

It had gotten very messy. It turns out that it's important to determine the year-handling lazily, because the sensible default is to depend on ratchetFrom. To enable this, much of LicenseHeaderStep's guts had become public, and it had factory methods with way too many parameters.

This PR refactors LicenseHeaderStep into an immutable builder pattern, which allows us to remove a lot of code from the gradle and maven plugins. It also offers a clean foundation for implementing features like #323.

@nedtwigg
Copy link
Member Author

Sorry for merging quickly without asking for feedback. OurFileSignature change forces a major version bump, so I wanted to take this opportunity to clear out the dead code, and the LicenseHeaderStep had developed a terribly warty API, in large part due to the recent ratchetFrom crusade I've been on.

Happy to revisit this even though it has already merged.

@nedtwigg nedtwigg merged commit 8e0a5d5 into main Jun 30, 2020
@nedtwigg nedtwigg deleted the feat/license-api branch June 30, 2020 05:14
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.

1 participant