From: Jacek Date: Thu, 5 Mar 2020 14:49:37 +0000 (+0100) Subject: SONAR-13042 fix exclusion counts in Scanner logs X-Git-Tag: 8.3.0.34182~155 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6c9938e19c97a44e8cec9a33fa6f9b0acbc7609a;p=sonarqube.git SONAR-13042 fix exclusion counts in Scanner logs --- diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/ProjectFileIndexer.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/ProjectFileIndexer.java index c72ccfbbddf..5f4da8fae26 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/ProjectFileIndexer.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/ProjectFileIndexer.java @@ -39,13 +39,13 @@ import java.util.concurrent.atomic.AtomicInteger; import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.SystemUtils; import org.sonar.api.batch.fs.InputFile.Type; +import org.sonar.api.batch.fs.internal.DefaultInputModule; import org.sonar.api.batch.scm.IgnoreCommand; import org.sonar.api.scan.filesystem.PathResolver; import org.sonar.api.utils.log.Logger; import org.sonar.api.utils.log.Loggers; import org.sonar.scanner.bootstrap.GlobalConfiguration; import org.sonar.scanner.bootstrap.GlobalServerSettings; -import org.sonar.api.batch.fs.internal.DefaultInputModule; import org.sonar.scanner.fs.InputModuleHierarchy; import org.sonar.scanner.scan.ModuleConfiguration; import org.sonar.scanner.scan.ModuleConfigurationProvider; @@ -163,7 +163,7 @@ public class ProjectFileIndexer { private static void logPaths(String label, Path baseDir, List paths) { if (!paths.isEmpty()) { StringBuilder sb = new StringBuilder(label); - for (Iterator it = paths.iterator(); it.hasNext(); ) { + for (Iterator it = paths.iterator(); it.hasNext();) { Path file = it.next(); Optional relativePathToBaseDir = PathResolver.relativize(baseDir, file); if (!relativePathToBaseDir.isPresent()) { @@ -282,11 +282,11 @@ public class ProjectFileIndexer { } public int getByPatternsCount() { - return excludedByScmCount.get(); + return excludedByPatternsCount.get(); } public void increaseByScmCount() { - excludedByPatternsCount.incrementAndGet(); + excludedByScmCount.incrementAndGet(); } public int getByScmCount() {