From a9d831ecdf1e9b75b99827977e30b3c842339fe0 Mon Sep 17 00:00:00 2001 From: Ulli Hafner Date: Wed, 6 Dec 2023 09:24:59 +0100 Subject: [PATCH] Use new autograding properties. --- .github/workflows/reporting.yml | 5 ++++- src/main/java/edu/hm/hafner/analysis/parser/AjcParser.java | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reporting.yml b/.github/workflows/reporting.yml index 56122e7be..db0e854c3 100644 --- a/.github/workflows/reporting.yml +++ b/.github/workflows/reporting.yml @@ -72,6 +72,7 @@ jobs: { "id": "spotbugs", "name": "SpotBugs", + "sourcePath": "src/main/java", "pattern": "**/target/spotbugsXml.xml" } ], @@ -88,12 +89,14 @@ jobs: "id": "jacoco", "name": "Line Coverage", "metric": "line", + "sourcePath": "src/main/java", "pattern": "**/target/site/jacoco/jacoco.xml" }, { "id": "jacoco", "name": "Branch Coverage", "metric": "branch", + "sourcePath": "src/main/java", "pattern": "**/target/site/jacoco/jacoco.xml" } ], @@ -135,7 +138,7 @@ jobs: git config --local user.email "action@github.com" git config --local user.name "GitHub Action" git add badges/*.svg - git commit -m "Update badges with results from latest autograding" + git commit -m "Update badges with results from latest autograding" || true - name: Push updated badges to GitHub repository uses: ad-m/github-push-action@master if: ${{ success() }} diff --git a/src/main/java/edu/hm/hafner/analysis/parser/AjcParser.java b/src/main/java/edu/hm/hafner/analysis/parser/AjcParser.java index d9e9a88e0..a8f365bf8 100644 --- a/src/main/java/edu/hm/hafner/analysis/parser/AjcParser.java +++ b/src/main/java/edu/hm/hafner/analysis/parser/AjcParser.java @@ -65,7 +65,7 @@ private Report parse(final Stream lines) { if (line.startsWith("\t")) { fillFileName(builder, line); } - else if ("".equals(line)) { + else if (line.isEmpty()) { state = States.PARSING; warnings.add(builder.buildAndClean());