diff --git a/.github/openhab-compile-problems.json b/.github/openhab-compile-problems.json new file mode 100644 index 000000000000..a5c5c4bb9dc5 --- /dev/null +++ b/.github/openhab-compile-problems.json @@ -0,0 +1,21 @@ +{ + "problemMatcher": [ + { + "owner": "openhab-compile-problems", + "severity": "error", + "pattern": [ + { + "regexp": "Failed to execute goal.*Compilation failure" + }, + { + "regexp": "^\\[ERROR\\] (.+\\.java):\\[(.+),(.+)\\] (.*)$", + "file": 1, + "line": 2, + "col": 3, + "message": 4, + "loop": true + } + ] + } + ] +} diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index ae6fc2af989f..fc5c2a2cf96b 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -54,6 +54,11 @@ jobs: with: maven-version: ${{ matrix.maven }} + - name: Register Problem Matchers + id: problem_matchers + run: | + echo "::add-matcher::.github/openhab-compile-problems.json" + - name: Get Changed Files id: files uses: Ana06/get-changed-files@v2.0.0 @@ -84,3 +89,11 @@ jobs: with: name: sat-summary-report path: target/summary_report.html + + - name: Report SAT Errors as Annotations + uses: ghys/checkstyle-github-action@main + if: ${{ always() && ((steps.build.outcome == 'success') || (steps.build.outcome == 'failure')) }} + with: + title: CheckStyle Violations + path: '**/checkstyle-result.xml' + mode: inline