Improve unused exclusion detection and remove those that are unused
See gh-20472
This commit is contained in:
committed by
Andy Wilkinson
parent
e2518917f4
commit
589213daab
@@ -69,9 +69,14 @@ public class CheckBom extends DefaultTask {
|
||||
.collect(Collectors.toSet());
|
||||
Set<String> unused = new TreeSet<>();
|
||||
for (String exclusion : exclusions) {
|
||||
if (!resolved.contains(exclusion) && exclusion.endsWith(":*")) {
|
||||
String group = exclusion.substring(0, exclusion.indexOf(':') + 1);
|
||||
if (resolved.stream().noneMatch((candidate) -> candidate.startsWith(group))) {
|
||||
if (!resolved.contains(exclusion)) {
|
||||
if (exclusion.endsWith(":*")) {
|
||||
String group = exclusion.substring(0, exclusion.indexOf(':') + 1);
|
||||
if (resolved.stream().noneMatch((candidate) -> candidate.startsWith(group))) {
|
||||
unused.add(exclusion);
|
||||
}
|
||||
}
|
||||
else {
|
||||
unused.add(exclusion);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user