Search in sources :

Example 56 with Requirements

use of com.synopsys.integration.detectable.detectable.Requirements in project synopsys-detect by blackducksoftware.

the class GoModCliDetectable method applicable.

@Override
public DetectableResult applicable() {
    Requirements requirements = new Requirements(fileFinder, environment);
    requirements.file(GOMOD_FILENAME_PATTERN);
    return requirements.result();
}
Also used : Requirements(com.synopsys.integration.detectable.detectable.Requirements)

Example 57 with Requirements

use of com.synopsys.integration.detectable.detectable.Requirements in project synopsys-detect by blackducksoftware.

the class ConanLockfileDetectable method applicable.

@Override
public DetectableResult applicable() {
    if (conanLockfileExtractorOptions.getLockfilePath().isPresent()) {
        Path conanLockFile = conanLockfileExtractorOptions.getLockfilePath().get();
        logger.debug("Conan Lockfile detectable applies because user supplied lockfile path {}", conanLockFile);
        // TODO: Should lock file be reported as a relevant file?
        return new PassedDetectableResult(new FoundFile(conanLockFile.toFile()));
    }
    Requirements requirements = new Requirements(fileFinder, environment);
    lockfile = requirements.file(CONANLOCKFILE);
    return requirements.result();
}
Also used : Path(java.nio.file.Path) FoundFile(com.synopsys.integration.detectable.detectable.explanation.FoundFile) PassedDetectableResult(com.synopsys.integration.detectable.detectable.result.PassedDetectableResult) Requirements(com.synopsys.integration.detectable.detectable.Requirements)

Example 58 with Requirements

use of com.synopsys.integration.detectable.detectable.Requirements in project synopsys-detect by blackducksoftware.

the class CargoDetectable method applicable.

@Override
public DetectableResult applicable() {
    Requirements requirements = new Requirements(fileFinder, environment);
    requirements.eitherFile(CARGO_LOCK_FILENAME, CARGO_TOML_FILENAME, foundLock -> cargoLock = foundLock, foundToml -> cargoToml = foundToml);
    return requirements.result();
}
Also used : Requirements(com.synopsys.integration.detectable.detectable.Requirements)

Example 59 with Requirements

use of com.synopsys.integration.detectable.detectable.Requirements in project synopsys-detect by blackducksoftware.

the class BitbakeDetectable method extractable.

@Override
public DetectableResult extractable() throws DetectableException {
    Requirements requirements = new Requirements(fileFinder, environment);
    bashExe = requirements.executable(bashResolver::resolveBash, "bash");
    return requirements.result();
}
Also used : Requirements(com.synopsys.integration.detectable.detectable.Requirements)

Example 60 with Requirements

use of com.synopsys.integration.detectable.detectable.Requirements in project synopsys-detect by blackducksoftware.

the class CarthageDetectable method applicable.

@Override
public DetectableResult applicable() {
    Requirements requirements = new Requirements(fileFinder, environment);
    requirements.eitherFile(CARTFILE_FILENAME, CARTFILE_RESOLVED_FILENAME, // Used only to identify Carthage projects
    foundCartfile -> {
    }, foundCartfileResolved -> cartfileResolved = foundCartfileResolved);
    return requirements.result();
}
Also used : Requirements(com.synopsys.integration.detectable.detectable.Requirements)

Aggregations

Requirements (com.synopsys.integration.detectable.detectable.Requirements)63 File (java.io.File)7 PropertyInsufficientDetectableResult (com.synopsys.integration.detectable.detectable.result.PropertyInsufficientDetectableResult)3 FilesNotFoundDetectableResult (com.synopsys.integration.detectable.detectable.result.FilesNotFoundDetectableResult)2 FileFinder (com.synopsys.integration.common.util.finder.FileFinder)1 Detectable (com.synopsys.integration.detectable.Detectable)1 DetectableEnvironment (com.synopsys.integration.detectable.DetectableEnvironment)1 SearchPattern (com.synopsys.integration.detectable.detectable.SearchPattern)1 DetectableInfo (com.synopsys.integration.detectable.detectable.annotation.DetectableInfo)1 CodeLocation (com.synopsys.integration.detectable.detectable.codelocation.CodeLocation)1 FoundFile (com.synopsys.integration.detectable.detectable.explanation.FoundFile)1 PropertyProvided (com.synopsys.integration.detectable.detectable.explanation.PropertyProvided)1 DetectableResult (com.synopsys.integration.detectable.detectable.result.DetectableResult)1 FailedDetectableResult (com.synopsys.integration.detectable.detectable.result.FailedDetectableResult)1 NpmNodeModulesNotFoundDetectableResult (com.synopsys.integration.detectable.detectable.result.NpmNodeModulesNotFoundDetectableResult)1 PackageResolvedNotFoundDetectableResult (com.synopsys.integration.detectable.detectable.result.PackageResolvedNotFoundDetectableResult)1 PassedDetectableResult (com.synopsys.integration.detectable.detectable.result.PassedDetectableResult)1 PackageResolvedExtractor (com.synopsys.integration.detectable.detectables.swift.lock.PackageResolvedExtractor)1 PackageResolvedResult (com.synopsys.integration.detectable.detectables.swift.lock.model.PackageResolvedResult)1 XcodeWorkspaceResult (com.synopsys.integration.detectable.detectables.xcode.model.XcodeWorkspaceResult)1