Skip to content

Commit

Permalink
style: be more groovy
Browse files Browse the repository at this point in the history
- follow advice from @Vampire and embrace  groovy
- #390 (comment)
  • Loading branch information
jeremylong authored May 15, 2024
1 parent c959bda commit be04e39
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -383,9 +383,9 @@ abstract class AbstractAnalyze extends ConfiguredTask {
*/
@groovy.transform.CompileStatic
static boolean isTestConfigurationCheck(Configuration configuration) {
boolean isTestConfiguration = configuration.name.matches('^(.*[a-z0-9_]T|_?t)est([A-Z0-9_].*)?$')
boolean isTestConfiguration = configuration.name =~ /((^|[a-z0-9_])T|(^|_)t)est([A-Z0-9_]|$)/
configuration.hierarchy.each {
isTestConfiguration |= it.name.matches('^(.*[a-z0-9_]T|_?t)est([A-Z0-9_].*)?$')
isTestConfiguration |= it.name =~ /((^|[a-z0-9_])T|(^|_)t)est([A-Z0-9_]|$)/
}
isTestConfiguration
}
Expand Down

0 comments on commit be04e39

Please sign in to comment.