feat(reports): Cppcheck HTML-Report via cppcheck-htmlreport, klickbar
Validate / build-test (macos-latest) (push) Failing after 6s
Validate / build-test (windows-latest) (push) Failing after 14s
Validate / build-test (ubuntu-latest) (push) Successful in 17s
Validate / reports (push) Successful in 51s

This commit is contained in:
Stefan Lohmaier
2026-05-12 03:08:16 -07:00
parent 1d7cf53881
commit 542a358abc
3 changed files with 30 additions and 13 deletions
+12 -4
View File
@@ -31,23 +31,30 @@ jobs:
make coverage make coverage
make test-report make test-report
- name: Traceability + Diagramme + API-Doc + Landing-Page - name: Traceability + Diagramme + API-Doc
run: | run: |
python3 tools/traceability.py publish docs/traceability python3 tools/traceability.py publish docs/traceability
python3 tools/render_plantuml.py python3 tools/render_plantuml.py
make docs make docs
make landing-page
- name: Cppcheck-Report (XML) - name: Cppcheck-Report (XML + HTML)
run: | run: |
mkdir -p build mkdir -p build
cppcheck --enable=all --inconclusive --xml --xml-version=2 \ cppcheck --enable=all --inconclusive --xml --xml-version=2 \
-I src src 2> build/cppcheck-report.xml || true -I src src 2> build/cppcheck-report.xml || true
cppcheck-htmlreport \
--file=build/cppcheck-report.xml \
--report-dir=build/cppcheck-html \
--source-dir=. \
--title="demo-epb Cppcheck Report" || echo "htmlreport skipped"
- name: Landing-Page
run: make landing-page
- name: Release-Bundle paketieren - name: Release-Bundle paketieren
run: | run: |
BUNDLE="release/demo-epb-${TAG}" BUNDLE="release/demo-epb-${TAG}"
mkdir -p "$BUNDLE"/{coverage,traceability,diagrams,api-doc,reports,docs,src,tests} mkdir -p "$BUNDLE"/{coverage,traceability,diagrams,api-doc,reports/cppcheck,docs,src,tests}
# Landing-Page (Startseite) im Bundle-Root # Landing-Page (Startseite) im Bundle-Root
cp build/index.html "$BUNDLE/index.html" cp build/index.html "$BUNDLE/index.html"
@@ -58,6 +65,7 @@ jobs:
cp -r docs/diagrams/* "$BUNDLE/diagrams/" cp -r docs/diagrams/* "$BUNDLE/diagrams/"
cp -r build/api-doc/html/* "$BUNDLE/api-doc/" 2>/dev/null || true cp -r build/api-doc/html/* "$BUNDLE/api-doc/" 2>/dev/null || true
cp build/cppcheck-report.xml "$BUNDLE/reports/" 2>/dev/null || true cp build/cppcheck-report.xml "$BUNDLE/reports/" 2>/dev/null || true
cp -r build/cppcheck-html/* "$BUNDLE/reports/cppcheck/" 2>/dev/null || true
cp build/test-report.html "$BUNDLE/reports/" 2>/dev/null || true cp build/test-report.html "$BUNDLE/reports/" 2>/dev/null || true
cp build/test-report.md "$BUNDLE/reports/" 2>/dev/null || true cp build/test-report.md "$BUNDLE/reports/" 2>/dev/null || true
+9 -2
View File
@@ -87,11 +87,17 @@ jobs:
- name: Doxygen API-Dokumentation - name: Doxygen API-Dokumentation
run: make docs run: make docs
- name: Cppcheck-Report (XML) - name: Cppcheck-Report (XML + HTML)
run: | run: |
mkdir -p build mkdir -p build
cppcheck --enable=all --inconclusive --xml --xml-version=2 \ cppcheck --enable=all --inconclusive --xml --xml-version=2 \
-I src src 2> build/cppcheck-report.xml || true -I src src 2> build/cppcheck-report.xml || true
# cppcheck-htmlreport ist Teil des cppcheck-Pakets
cppcheck-htmlreport \
--file=build/cppcheck-report.xml \
--report-dir=build/cppcheck-html \
--source-dir=. \
--title="demo-epb Cppcheck Report" || echo "htmlreport skipped"
- name: Landing-Page - name: Landing-Page
run: make landing-page run: make landing-page
@@ -156,7 +162,7 @@ jobs:
echo "Mount $DEPLOY nicht da — Runner-Config pruefen. Skip." echo "Mount $DEPLOY nicht da — Runner-Config pruefen. Skip."
exit 0 exit 0
fi fi
mkdir -p "$DEPLOY"/{docs,coverage,traceability,diagrams,api-doc,reports,src,misra/records} mkdir -p "$DEPLOY"/{docs,coverage,traceability,diagrams,api-doc,reports/cppcheck,src,misra/records}
cp build/index.html "$DEPLOY/index.html" cp build/index.html "$DEPLOY/index.html"
cp -r docs/plaene docs/safety docs/manuals docs/reviews docs/non-conformities "$DEPLOY/docs/" cp -r docs/plaene docs/safety docs/manuals docs/reviews docs/non-conformities "$DEPLOY/docs/"
cp -r build/coverage-html/. "$DEPLOY/coverage/" 2>/dev/null || true cp -r build/coverage-html/. "$DEPLOY/coverage/" 2>/dev/null || true
@@ -165,6 +171,7 @@ jobs:
cp -r build/api-doc/html/. "$DEPLOY/api-doc/" 2>/dev/null || true cp -r build/api-doc/html/. "$DEPLOY/api-doc/" 2>/dev/null || true
cp build/test-report.html build/test-report.md "$DEPLOY/reports/" 2>/dev/null || true cp build/test-report.html build/test-report.md "$DEPLOY/reports/" 2>/dev/null || true
cp build/cppcheck-report.xml "$DEPLOY/reports/" 2>/dev/null || true cp build/cppcheck-report.xml "$DEPLOY/reports/" 2>/dev/null || true
cp -r build/cppcheck-html/. "$DEPLOY/reports/cppcheck/" 2>/dev/null || true
cp src/*.c src/*.h "$DEPLOY/src/" cp src/*.c src/*.h "$DEPLOY/src/"
cp -r src/stubs "$DEPLOY/src/" 2>/dev/null || true cp -r src/stubs "$DEPLOY/src/" 2>/dev/null || true
cp -r misra/records/. "$DEPLOY/misra/records/" 2>/dev/null || true cp -r misra/records/. "$DEPLOY/misra/records/" 2>/dev/null || true
+4 -2
View File
@@ -242,8 +242,10 @@ footer {{ text-align: center; color: #888; padding: 30px; font-size: 13px; }}
"Statement + Branch Coverage, klickbar bis Zeilen-Level") "Statement + Branch Coverage, klickbar bis Zeilen-Level")
html_body += report_link("API-Dokumentation (Doxygen)", rep_paths["api"], True, html_body += report_link("API-Dokumentation (Doxygen)", rep_paths["api"], True,
"Alle Header + Funktionen, mit @arch/@reqs/@asil") "Alle Header + Funktionen, mit @arch/@reqs/@asil")
html_body += report_link("Cppcheck-Report (XML)", rep_paths["cppcheck"], True, html_body += report_link("Cppcheck-Report (HTML)", "reports/cppcheck/index.html", True,
"Statische Analyse + MISRA-Findings (XML zum Download)") "Statische Analyse + MISRA-Findings, klickbar pro Datei")
html_body += report_link("Cppcheck-Report (XML, Roh)", rep_paths["cppcheck"], True,
"Maschinen-lesbares Format fuer eigene Tools")
html_body += "</ul></section>" html_body += "</ul></section>"
# Diagrams # Diagrams