use of com.societegenerale.commons.plugin.service.InvokableRules.InvocationResult in project arch-unit-build-plugin-core by societe-generale.
the class RuleInvokerService method invokeConfigurableRules.
private String invokeConfigurableRules(ConfigurableRule rule) {
if (rule.isSkip()) {
if (log.isInfoEnabled()) {
log.info("Skipping rule " + rule.getRule());
}
return "";
}
InvokableRules invokableRules = InvokableRules.of(rule.getRule(), rule.getChecks(), log);
String fullPathFromRootTopackage = getPackageNameOnWhichToApplyRules(rule);
log.info("invoking ConfigurableRule " + rule.toString() + " on " + fullPathFromRootTopackage);
JavaClasses classes = archUtils.importAllClassesInPackage(new RootClassFolder(""), fullPathFromRootTopackage, excludedPaths);
InvocationResult result = invokableRules.invokeOn(classes);
return result.getMessage();
}
Aggregations