Search in sources :

Example 1 with GoModCommandRunner

use of com.synopsys.integration.detectable.detectables.go.gomod.GoModCommandRunner in project synopsys-detect by blackducksoftware.

the class DetectableFactory method goModCliExtractor.

private GoModCliExtractor goModCliExtractor(GoModCliDetectableOptions options) {
    GoModCommandRunner goModCommandRunner = new GoModCommandRunner(executableRunner);
    GoListParser goListParser = new GoListParser(gson);
    GoGraphParser goGraphParser = new GoGraphParser();
    GoModWhyParser goModWhyParser = new GoModWhyParser();
    GoVersionParser goVersionParser = new GoVersionParser();
    GoModGraphGenerator goModGraphGenerator = new GoModGraphGenerator(externalIdFactory);
    return new GoModCliExtractor(goModCommandRunner, goListParser, goGraphParser, goModWhyParser, goVersionParser, goModGraphGenerator, externalIdFactory, options.getExcludedDependencyTypes());
}
Also used : GoListParser(com.synopsys.integration.detectable.detectables.go.gomod.parse.GoListParser) GoModCliExtractor(com.synopsys.integration.detectable.detectables.go.gomod.GoModCliExtractor) GoModWhyParser(com.synopsys.integration.detectable.detectables.go.gomod.parse.GoModWhyParser) GoModGraphGenerator(com.synopsys.integration.detectable.detectables.go.gomod.process.GoModGraphGenerator) GoModCommandRunner(com.synopsys.integration.detectable.detectables.go.gomod.GoModCommandRunner) GoVersionParser(com.synopsys.integration.detectable.detectables.go.gomod.parse.GoVersionParser) GoGraphParser(com.synopsys.integration.detectable.detectables.go.gomod.parse.GoGraphParser)

Example 2 with GoModCommandRunner

use of com.synopsys.integration.detectable.detectables.go.gomod.GoModCommandRunner in project synopsys-detect by blackducksoftware.

the class GoModCliExtractorTest method buildGoModCliExtractor.

private GoModCliExtractor buildGoModCliExtractor(DetectableExecutableRunner executableRunner, Answer<ExecutableOutput> executableAnswer) throws ExecutableRunnerException {
    Mockito.doAnswer(executableAnswer).when(executableRunner).execute(Mockito.any(Executable.class));
    GoModWhyParser goModWhyParser = new GoModWhyParser();
    GoVersionParser goVersionParser = new GoVersionParser();
    GoModCommandRunner goModCommandRunner = new GoModCommandRunner(executableRunner);
    GoModGraphGenerator goModGraphGenerator = new GoModGraphGenerator(new ExternalIdFactory());
    GoListParser goListParser = new GoListParser(new GsonBuilder().create());
    GoGraphParser goGraphParser = new GoGraphParser();
    ExternalIdFactory externalIdFactory = new ExternalIdFactory();
    return new GoModCliExtractor(goModCommandRunner, goListParser, goGraphParser, goModWhyParser, goVersionParser, goModGraphGenerator, externalIdFactory, GoModDependencyType.UNUSED);
}
Also used : GoListParser(com.synopsys.integration.detectable.detectables.go.gomod.parse.GoListParser) GoModCliExtractor(com.synopsys.integration.detectable.detectables.go.gomod.GoModCliExtractor) GoModWhyParser(com.synopsys.integration.detectable.detectables.go.gomod.parse.GoModWhyParser) GoModGraphGenerator(com.synopsys.integration.detectable.detectables.go.gomod.process.GoModGraphGenerator) GsonBuilder(com.google.gson.GsonBuilder) ExternalIdFactory(com.synopsys.integration.bdio.model.externalid.ExternalIdFactory) GoModCommandRunner(com.synopsys.integration.detectable.detectables.go.gomod.GoModCommandRunner) GoVersionParser(com.synopsys.integration.detectable.detectables.go.gomod.parse.GoVersionParser) Executable(com.synopsys.integration.executable.Executable) GoGraphParser(com.synopsys.integration.detectable.detectables.go.gomod.parse.GoGraphParser)

Aggregations

GoModCliExtractor (com.synopsys.integration.detectable.detectables.go.gomod.GoModCliExtractor)2 GoModCommandRunner (com.synopsys.integration.detectable.detectables.go.gomod.GoModCommandRunner)2 GoGraphParser (com.synopsys.integration.detectable.detectables.go.gomod.parse.GoGraphParser)2 GoListParser (com.synopsys.integration.detectable.detectables.go.gomod.parse.GoListParser)2 GoModWhyParser (com.synopsys.integration.detectable.detectables.go.gomod.parse.GoModWhyParser)2 GoVersionParser (com.synopsys.integration.detectable.detectables.go.gomod.parse.GoVersionParser)2 GoModGraphGenerator (com.synopsys.integration.detectable.detectables.go.gomod.process.GoModGraphGenerator)2 GsonBuilder (com.google.gson.GsonBuilder)1 ExternalIdFactory (com.synopsys.integration.bdio.model.externalid.ExternalIdFactory)1 Executable (com.synopsys.integration.executable.Executable)1