From 6c9938e19c97a44e8cec9a33fa6f9b0acbc7609a Mon Sep 17 00:00:00 2001 From: Jacek Date: Thu, 5 Mar 2020 15:49:37 +0100 Subject: [PATCH] SONAR-13042 fix exclusion counts in Scanner logs --- .../sonar/scanner/scan/filesystem/ProjectFileIndexer.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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() { -- 2.39.5