diff --git a/src/main/java/org/sonar/plugins/scala/cobertura/CoberturaSensor.java b/src/main/java/org/sonar/plugins/scala/cobertura/CoberturaSensor.java index cf3da99..9621bc7 100644 --- a/src/main/java/org/sonar/plugins/scala/cobertura/CoberturaSensor.java +++ b/src/main/java/org/sonar/plugins/scala/cobertura/CoberturaSensor.java @@ -59,7 +59,11 @@ public boolean shouldExecuteOnProject(Project project) { } public void analyse(Project project, SensorContext context) { - String path = settings.getString(COBERTURA_REPORTS_PATH_PROPERTY); + String path = settings.getString(COBERTURA_REPORTS_PATH_PROPERTY); + if (path == null){ + LOG.warn("Cobertura report path property \"sonar.cobertura.reportPath\" not found!"); + return; + } File report = pathResolver.relativeFile(fileSystem.baseDir(), path); if (!report.isFile()) { LOG.warn("Cobertura report not found at {}", report);