From db7308fbf0bea6e4d8b9805e07e0f4629a518d9a Mon Sep 17 00:00:00 2001 From: Pascal Porta Date: Fri, 4 Sep 2020 12:12:32 +0200 Subject: [PATCH] JaCoCoAnalyzer: log missing file only if extension is groovy --- codenarc-converter/pom.xml | 2 +- groovy-jacoco-previous/pom.xml | 2 +- pom.xml | 2 +- sonar-groovy-plugin/pom.xml | 2 +- .../java/org/sonar/plugins/groovy/jacoco/JaCoCoAnalyzer.java | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/codenarc-converter/pom.xml b/codenarc-converter/pom.xml index be426258..d6cc9d3a 100644 --- a/codenarc-converter/pom.xml +++ b/codenarc-converter/pom.xml @@ -5,7 +5,7 @@ org.sonarsource.groovy groovy - 1.7-SNAPSHOT + 1.7-CIT-MVN-162-SNAPSHOT sonar-codenarc-converter diff --git a/groovy-jacoco-previous/pom.xml b/groovy-jacoco-previous/pom.xml index 4c727bfb..dc9678f8 100644 --- a/groovy-jacoco-previous/pom.xml +++ b/groovy-jacoco-previous/pom.xml @@ -5,7 +5,7 @@ org.sonarsource.groovy groovy - 1.7-SNAPSHOT + 1.7-CIT-MVN-162-SNAPSHOT groovy-jacoco-previous diff --git a/pom.xml b/pom.xml index 6025848d..7ab00723 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ org.sonarsource.groovy groovy - 1.7-SNAPSHOT + 1.7-CIT-MVN-162-SNAPSHOT pom Sonar Groovy diff --git a/sonar-groovy-plugin/pom.xml b/sonar-groovy-plugin/pom.xml index 6e123bb9..3fcb24dd 100644 --- a/sonar-groovy-plugin/pom.xml +++ b/sonar-groovy-plugin/pom.xml @@ -5,7 +5,7 @@ org.sonarsource.groovy groovy - 1.7-SNAPSHOT + 1.7-CIT-MVN-162-SNAPSHOT sonar-groovy-plugin diff --git a/sonar-groovy-plugin/src/main/java/org/sonar/plugins/groovy/jacoco/JaCoCoAnalyzer.java b/sonar-groovy-plugin/src/main/java/org/sonar/plugins/groovy/jacoco/JaCoCoAnalyzer.java index 0d1eb4b7..6fc3d45f 100644 --- a/sonar-groovy-plugin/src/main/java/org/sonar/plugins/groovy/jacoco/JaCoCoAnalyzer.java +++ b/sonar-groovy-plugin/src/main/java/org/sonar/plugins/groovy/jacoco/JaCoCoAnalyzer.java @@ -81,7 +81,7 @@ private InputFile getInputFile(ISourceFileCoverage coverage) { String path = getFileRelativePath(coverage); InputFile sourceInputFileFromRelativePath = groovyFileSystem.sourceInputFileFromRelativePath(path); - if (sourceInputFileFromRelativePath == null) { + if (sourceInputFileFromRelativePath == null && path.endsWith(".groovy")) { JaCoCoExtensions.logger().warn("File not found: " + path); } return sourceInputFileFromRelativePath;