dependency-check / dependency-check-gradle

The dependency-check gradle plugin is a Software Composition Analysis (SCA) tool that allows projects to monitor dependent libraries for known, published vulnerabilities.

Home Page:http://jeremylong.github.io/DependencyCheck/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Please check contains "test" for `skipTestGroups`, not starts with

Vampire opened this issue · comments

Currently, the skipTestGroups only checks for configurations starting with androidTest or test.
But this does not match things like integTest..., systemTest..., functionalTest..., ...
I think for the default recognition it would be more appropriate to check for toLowerCase().contains("test") instead.

To do something like that manually, you need some discouraged work-arounds like in the comments of #22 that reach into the models of all other projects to get all configuration names and then be able to filter on them, or list them all in the root project and hope none get added in subprojects in the future.

Sorry about the delay, I've had a ton going on outside of my OSS work. Can you take a look at #392 .

Does that work for you?

Sure, regex check is of course fine too.
I'd probably have done

boolean isTestConfiguration = configuration.name =~ /((^|[a-z0-9_])T|(^|_)t)est([A-Z0-9_]|$)/

instead though. :-)

My groovy code looks so much like Java... Fixed: be04e39

Well, I wouldn't use Groovy for a public plugin anyway. :-D

In hindsight I wouldn't either.