Skip to content

Functions annotated with TestFactory must return a value hence must be ignored by TestMethodsShouldBeVoid recipe#935

Merged
timtebeek merged 1 commit intoopenrewrite:mainfrom
barbulescu:testfactory
Mar 22, 2026
Merged

Functions annotated with TestFactory must return a value hence must be ignored by TestMethodsShouldBeVoid recipe#935
timtebeek merged 1 commit intoopenrewrite:mainfrom
barbulescu:testfactory

Conversation

@barbulescu
Copy link
Contributor

What's changed?

Functions annotated with TestFactory are ignored by TestMethodsShouldBeVoid recipe

What's your motivation?

These functions must return a value

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've read and applied the recipe conventions and best practices
  • I've used the IntelliJ IDEA auto-formatter on affected files

Copy link
Member

@timtebeek timtebeek left a comment

Choose a reason for hiding this comment

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

Thanks a lot! We'll get this out in a new release likely this week.

@timtebeek timtebeek merged commit 014300f into openrewrite:main Mar 22, 2026
1 check passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in OpenRewrite Mar 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

TestMethodsShouldBeVoid should ignore test factory junit functions

2 participants