fixing summary and scan path registration
@@ -66,6 +66,7 @@ class HubSignatureScanner {
private Set<String> registeredPathsToExclude = []
public void registerPathToScan(File file, String... fileNamesToExclude) {
+ if (!detectConfiguration.hubSignatureScannerDisabled) {
String matchingExcludedPath = detectConfiguration.hubSignatureScannerPathsToExclude.find {
file.canonicalPath.startsWith(it)
}
@@ -73,9 +74,7 @@ class HubSignatureScanner {
if (matchingExcludedPath) {
logger.info("Not registering excluded path ${file.canonicalPath} to scan")
} else if (file.exists() && (file.isFile() || file.isDirectory())) {
- if (!detectConfiguration.hubSignatureScannerDisabled) {
detectSummary.addPathToBeScanned(file)
- }
logger.info("Registering path ${file.canonicalPath} to scan")
registeredPaths.add(file.canonicalPath)
if (fileNamesToExclude) {
@@ -97,6 +96,9 @@ class HubSignatureScanner {
} else {
logger.warn("Tried to register a scan for ${file.canonicalPath} but it doesn't appear to exist or it isn't a file or directory.")
}
+ } else {
+ logger.info("Not registering path ${file.canonicalPath}, scan is disabled")
+ }
}
public ProjectVersionView scanPaths(HubServerConfig hubServerConfig, CLIDataService cliDataService, DetectProject detectProject) {
