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

Introduce Reactor ContextEmpty Refaster rule #306

Merged
merged 4 commits into from
Oct 23, 2022
Merged

Conversation

werli
Copy link
Member

@werli werli commented Oct 19, 2022

To ensure usage of the intended API.


Suggested commit message:

Introduce Reactor `ContextEmpty` Refaster rule (#306)

@werli werli force-pushed the werli/reactor-context branch from a5ddfa1 to fa1c966 Compare October 20, 2022 12:47
@werli
Copy link
Member Author

werli commented Oct 20, 2022

^ Rebased and (hopefully) fixed the build. 👌

@rickie
Copy link
Member

rickie commented Oct 21, 2022

Added a commit to fix the build.

If the formatter is removing an import in the output file, we can add it to the elidedTypesAndStaticImports to make sure the formatter doesn't want to remove the import. The import is unused, but Refaster doesn't remove the import for us.

@rickie rickie added this to the 0.5.0 milestone Oct 21, 2022
@rickie rickie requested review from rickie and Stephan202 October 21, 2022 07:18
Copy link
Member

@Stephan202 Stephan202 left a comment

Choose a reason for hiding this comment

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

Added a commit. Nice contribution!

static final class ContextEmpty {
@BeforeTemplate
Context before() {
return Context.of(ImmutableMap.of());
Copy link
Member

Choose a reason for hiding this comment

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

Users outside of Picnic might be more likely to use new HashMap<>(); let's add a case for that.

Copy link
Member

Choose a reason for hiding this comment

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

(Better would be to introduce a Matcher for this, but that's something for a separate PR.)

Copy link
Member

@rickie rickie left a comment

Choose a reason for hiding this comment

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

Nice contribution @werli 🚀 !

@rickie rickie changed the title Introduce Reactor Context#empty Refaster rule Introduce Reactor ContextEmpty Refaster rule Oct 23, 2022
@rickie rickie merged commit 0118cc6 into master Oct 23, 2022
@rickie rickie deleted the werli/reactor-context branch October 23, 2022 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants