use of com.synopsys.integration.detect.tool.detector.DetectorRuleFactory in project synopsys-detect by blackducksoftware.
the class OperationFactory method executeDetectors.
public final DetectorToolResult executeDetectors() throws OperationException {
return auditLog.namedPublic("Execute Detectors", "Detectors", () -> {
DetectorToolOptions detectorToolOptions = detectConfigurationFactory.createDetectorToolOptions();
DetectorRuleFactory detectorRuleFactory = new DetectorRuleFactory();
DetectorRuleSet detectRuleSet = detectorRuleFactory.createRules(detectDetectableFactory, detectorToolOptions.isBuildless());
DetectorTool detectorTool = new DetectorTool(new DetectorFinder(), extractionEnvironmentProvider, eventSystem, codeLocationConverter, new DetectorIssuePublisher(), statusEventPublisher, exitCodePublisher, detectorEventPublisher);
return detectorTool.performDetectors(directoryManager.getSourceDirectory(), detectRuleSet, detectConfigurationFactory.createDetectorFinderOptions(), detectConfigurationFactory.createDetectorEvaluationOptions(), detectorToolOptions.getProjectBomTool(), detectorToolOptions.getRequiredDetectors(), fileFinder);
});
}
use of com.synopsys.integration.detect.tool.detector.DetectorRuleFactory in project synopsys-detect by blackducksoftware.
the class HelpJsonManager method createHelpJsonDetectorList.
private List<HelpJsonDetector> createHelpJsonDetectorList(boolean buildless) {
DetectorRuleFactory ruleFactory = new DetectorRuleFactory();
// TODO: Is there a better way to build a fake set of rules?
DetectDetectableFactory mockFactory = new DetectDetectableFactory(null, null, null, null, null, null, null, null);
DetectorRuleSet ruleSet = ruleFactory.createRules(mockFactory, buildless);
return ruleSet.getOrderedDetectorRules().stream().map(detectorRule -> convertDetectorRule(detectorRule, ruleSet)).collect(Collectors.toList());
}
Aggregations