diff --git a/README.md b/README.md index fd736a4..46dec46 100644 --- a/README.md +++ b/README.md @@ -43,5 +43,5 @@ Run to execute ```mvn codeql2sonar:SonarIssueReporter``` ``` When using on command line with __-Dcodeql2sonar.sarif.path.exclude=__ the paths can be separated by comma, e.g. ``` - -Dcodeql2sonar.sarif.path.exclude=path/subdir1,path/subdir2/ + -Dcodeql2sonar.sarif.path.excludes=path/subdir1,path/subdir2/ ``` diff --git a/src/main/java/com/baloise/open/maven/SonarIssueReporter.java b/src/main/java/com/baloise/open/maven/SonarIssueReporter.java index 80a8aa1..2319415 100644 --- a/src/main/java/com/baloise/open/maven/SonarIssueReporter.java +++ b/src/main/java/com/baloise/open/maven/SonarIssueReporter.java @@ -142,7 +142,10 @@ private Writer getWriter() throws IOException { } private void writeResult(SonarIssueMapper sonarIssueMapper, Writer writer) throws IOException { - final Issues mappedIssues = sonarIssueMapper.getMappedIssues(getPatternsToExclude()); + final String[] patternsToExclude = getPatternsToExclude(); + getLog().debug("patterns to exclude: " + Arrays.toString(patternsToExclude)); + + final Issues mappedIssues = sonarIssueMapper.getMappedIssues(patternsToExclude); getLog().info(String.format("Writing target '%s' containing %d issues.", target, mappedIssues.getResult().size())); new GsonBuilder().setPrettyPrinting().create().toJson(mappedIssues, writer);