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

PMD produces JUnit 4 errors for JUnit 5 tests #34

Closed
AdamCarroll opened this issue Feb 18, 2018 · 2 comments
Closed

PMD produces JUnit 4 errors for JUnit 5 tests #34

AdamCarroll opened this issue Feb 18, 2018 · 2 comments

Comments

@AdamCarroll
Copy link
Member

PMD produces errors such as the following for the JUnit 5 tests:

JUnit 4 tests that set up tests should use the @before annotation

To workaround this, the rules are explicitly excluded in the PMD config:

<exclude name="JUnit4TestShouldUseBeforeAnnotation"/>
<exclude name="JUnit4TestShouldUseAfterAnnotation"/>
<exclude name="JUnit4TestShouldUseTestAnnotation"/>
@AdamCarroll
Copy link
Member Author

Raised on the PMD project as pmd/pmd#940

@AdamCarroll
Copy link
Member Author

This is fixed in 8a980fd with the upgrade to PMD v6.7.0.

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

No branches or pull requests

1 participant