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
Issue314 exclude classname patterns #630
Conversation
} | ||
|
||
/** | ||
* Add patterns to the list of <em>included</em> patterns. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should say excluded. 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though... TBH, you did a great job of finding all other occurrences of included and replacing them. 👍
new String[0]); | ||
|
||
if (patterns.length == 0) { | ||
return new String[] {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to create a new array here. That was done in the previous line. So just return patterns
if its length is 0
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True enough, thanks for pointing out. On second thoughts I decided to drop the check for zero length altogether. The following code is robust with respect to zero length arrays and the resulting code is simpler.
@sormuras |
f23c3ae
to
78cc0f4
Compare
Looks good! Please remember to update the documentation of |
🎉 #644 |
Overview
This PR addresses issue #314.
It adds support for filtering classes for exclusion in the ConsoleLauncher, the Gradle JUnit 5 plugin, and the JUnitPlatform runner.
I hereby agree to the terms of the JUnit Contributor License Agreement.