]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-13042 fix exclusion counts in Scanner logs
authorJacek <jacek.poreda@sonarsource.com>
Thu, 5 Mar 2020 14:49:37 +0000 (15:49 +0100)
committersonartech <sonartech@sonarsource.com>
Fri, 6 Mar 2020 20:04:32 +0000 (20:04 +0000)
sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/ProjectFileIndexer.java

index c72ccfbbddf3c1f24d108bab589a5eefaf097636..5f4da8fae26b38a8b87e6fb416695bfbda4f2ce6 100644 (file)
@@ -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<Path> paths) {
     if (!paths.isEmpty()) {
       StringBuilder sb = new StringBuilder(label);
-      for (Iterator<Path> it = paths.iterator(); it.hasNext(); ) {
+      for (Iterator<Path> it = paths.iterator(); it.hasNext();) {
         Path file = it.next();
         Optional<String> 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() {