Update ThirdPartyAuditTask to check for and list pointless exclusions. (#2760)
This change swaps the order of the task to first check for no pointless exclusions. If not caught first these will be thrown inside of the bogusExcludesCount block that logs a useless error message. Signed-off-by: Marc Handalian <handalm@amazon.com>
This commit is contained in:
parent
6103010e14
commit
21f9950806
|
@ -237,6 +237,7 @@ public class ThirdPartyAuditTask extends DefaultTask {
|
||||||
Set<String> jdkJarHellClasses = runJdkJarHellCheck();
|
Set<String> jdkJarHellClasses = runJdkJarHellCheck();
|
||||||
|
|
||||||
if (missingClassExcludes != null) {
|
if (missingClassExcludes != null) {
|
||||||
|
assertNoPointlessExclusions("are not missing", missingClassExcludes, missingClasses);
|
||||||
long bogousExcludesCount = Stream.concat(missingClassExcludes.stream(), violationsExcludes.stream())
|
long bogousExcludesCount = Stream.concat(missingClassExcludes.stream(), violationsExcludes.stream())
|
||||||
.filter(each -> missingClasses.contains(each) == false)
|
.filter(each -> missingClasses.contains(each) == false)
|
||||||
.filter(each -> violationsClasses.contains(each) == false)
|
.filter(each -> violationsClasses.contains(each) == false)
|
||||||
|
@ -247,7 +248,6 @@ public class ThirdPartyAuditTask extends DefaultTask {
|
||||||
"All excluded classes seem to have no issues. " + "This is sometimes an indication that the check silently failed"
|
"All excluded classes seem to have no issues. " + "This is sometimes an indication that the check silently failed"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
assertNoPointlessExclusions("are not missing", missingClassExcludes, missingClasses);
|
|
||||||
missingClasses.removeAll(missingClassExcludes);
|
missingClasses.removeAll(missingClassExcludes);
|
||||||
}
|
}
|
||||||
assertNoPointlessExclusions("have no violations", violationsExcludes, violationsClasses);
|
assertNoPointlessExclusions("have no violations", violationsExcludes, violationsClasses);
|
||||||
|
|
Loading…
Reference in New Issue