use of com.synopsys.integration.detectable.detectable.PassedResultBuilder in project synopsys-detect by blackducksoftware.
the class PipenvDetectable method applicable.
@Override
public DetectableResult applicable() {
File pipfile = fileFinder.findFile(environment.getDirectory(), PIPFILE_FILE_NAME);
File pipfileDotLock = fileFinder.findFile(environment.getDirectory(), PIPFILE_DOT_LOCK_FILE_NAME);
if (pipfile != null || pipfileDotLock != null) {
PassedResultBuilder passedResultBuilder = new PassedResultBuilder();
passedResultBuilder.foundNullableFile(pipfile);
passedResultBuilder.foundNullableFile(pipfileDotLock);
return passedResultBuilder.build();
} else {
return new FilesNotFoundDetectableResult(PIPFILE_FILE_NAME, PIPFILE_DOT_LOCK_FILE_NAME);
}
}
use of com.synopsys.integration.detectable.detectable.PassedResultBuilder in project synopsys-detect by blackducksoftware.
the class GoDepLockDetectable method applicable.
@Override
public DetectableResult applicable() {
PassedResultBuilder passedResultBuilder = new PassedResultBuilder();
goLock = fileFinder.findFile(environment.getDirectory(), GOPKG_LOCK_FILENAME);
if (goLock == null) {
goToml = fileFinder.findFile(environment.getDirectory(), GOFILE_FILENAME_PATTERN);
if (goToml == null) {
return new FilesNotFoundDetectableResult(GOPKG_LOCK_FILENAME, GOFILE_FILENAME_PATTERN);
} else {
passedResultBuilder.foundFile(goToml);
}
} else {
passedResultBuilder.foundFile(goLock);
}
return passedResultBuilder.build();
}
use of com.synopsys.integration.detectable.detectable.PassedResultBuilder in project synopsys-detect by blackducksoftware.
the class PipenvDetectable method applicable.
@Override
public DetectableResult applicable() {
File pipfile = fileFinder.findFile(environment.getDirectory(), PIPFILE_FILE_NAME);
File pipfileDotLock = fileFinder.findFile(environment.getDirectory(), PIPFILE_DOT_LOCK_FILE_NAME);
if (pipfile != null || pipfileDotLock != null) {
PassedResultBuilder passedResultBuilder = new PassedResultBuilder();
passedResultBuilder.foundNullableFile(pipfile);
passedResultBuilder.foundNullableFile(pipfileDotLock);
return passedResultBuilder.build();
} else {
return new FilesNotFoundDetectableResult(PIPFILE_FILE_NAME, PIPFILE_DOT_LOCK_FILE_NAME);
}
}
use of com.synopsys.integration.detectable.detectable.PassedResultBuilder in project synopsys-detect by blackducksoftware.
the class NugetProjectDetectable method applicable.
@Override
public DetectableResult applicable() {
projectFiles = fileFinder.findFiles(environment.getDirectory(), SUPPORTED_PROJECT_PATTERNS);
if (projectFiles != null && projectFiles.size() > 0) {
PassedResultBuilder passedResultBuilder = new PassedResultBuilder();
projectFiles.forEach(passedResultBuilder::foundFile);
return passedResultBuilder.build();
} else {
return new FilesNotFoundDetectableResult(SUPPORTED_PROJECT_PATTERNS);
}
}
use of com.synopsys.integration.detectable.detectable.PassedResultBuilder in project synopsys-detect by blackducksoftware.
the class NugetSolutionDetectable method applicable.
@Override
public DetectableResult applicable() {
solutionFiles = fileFinder.findFiles(environment.getDirectory(), SUPPORTED_SOLUTION_PATTERNS);
if (solutionFiles != null && solutionFiles.size() > 0) {
PassedResultBuilder passedResultBuilder = new PassedResultBuilder();
solutionFiles.forEach(passedResultBuilder::foundFile);
return passedResultBuilder.build();
} else {
return new FilesNotFoundDetectableResult(SUPPORTED_SOLUTION_PATTERNS);
}
}
Aggregations