Skip to content

Commit 2ae2f6e

Browse files
committed
Always generate report, even if no findings were found (fixes #7)
1 parent e667d32 commit 2ae2f6e

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/main/java/de/chkal/maven/gitlab/codequality/GenerateMojo.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,12 @@ public void execute() throws MojoFailureException {
6464
));
6565

6666
// Create GitLab report
67-
if (findings.size() > 0) {
68-
try (FileOutputStream stream = new FileOutputStream(outputFile)) {
69-
new ReportSerializer().write(findings, stream);
70-
log.info("GitLab code quality report for {} issue created: {}",
71-
findings.size(), outputFile);
72-
} catch (IOException e) {
73-
throw new IllegalStateException(e);
74-
}
67+
try (FileOutputStream stream = new FileOutputStream(outputFile)) {
68+
new ReportSerializer().write(findings, stream);
69+
log.info("GitLab code quality report for {} issue created: {}",
70+
findings.size(), outputFile);
71+
} catch (IOException e) {
72+
throw new IllegalStateException(e);
7573
}
7674

7775
}

0 commit comments

Comments
 (0)