-
Notifications
You must be signed in to change notification settings - Fork 29
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
Add Ant/Maven style classname filters #4
Comments
Sure, I think if you take a look at the necessary Ant utilities you can probably graft those in. |
Let me know how you would like to add it (add a new property in ClassnameFilter? Create a separate annotation? Add a flag? Change the default?) and I'll try to come up with a pull-request. AFAIK maven-surefire uses MatchPatterns, but perhaps that's too big of a dependency to pull in just for this - the actual code should be around ~20 lines. |
I think changing the default behaviour and using the same patterns as Surefire/Ant would be useful. Then we can point people at existing documentation. We can bump the major version and I'm not sure many people use this library so I think changing the default behaviour is fine. |
I'm not sure if cpsuite documentation has been amended to reflect this change. I personally find the whole subject of matching on qualified class names extremely confusing. The maven surefire documents (if they correspond to the changes made in cpsuite) are also confusing. Some clarity and working examples would be good. |
There is an off-by-one error in the current code. |
The current implementation of @ClassnameFilters uses regex for filtering which frequently requires double-escaping strings and also is less common than Ant/Maven style filters (where "" means "anything except for dot" and "*" means anything, including dots).
For example the same filter would be encoded as:
Could we have support for the second version? Perhaps as a different field on @ClassnameFilters or a different annotation? (like @AntClassnameFilters)
The text was updated successfully, but these errors were encountered: