ci: S10.20 flip MISRA + naming gates to error mode and close E10#438
Conversation
- cppcheck-misra: --error-exitcode=0 → 1 on both Run and Generate-XML steps. - Add Platform/MbedTls/Source/ to cppcheck-misra invocation. - Widen non-MISRA cppcheck XML pass scope to Core/ + Platform/*/Source/. - Widen analyze-format scope to include Platform/. - clang-tidy: WarningsAsErrors '*,-readability-identifier-naming' → '*'. - Delete docs/misra-conformance.md (audit-phase doc, live truth lives in docs/misra-deviations.md + misra_suppressions.txt). - Tests/DatagramFake.h: reword per-slot vs out-of-range comment. - MbedTls verification surfaced 7 findings: 4 existing-deviation extensions (D.002, D.009), 1 trailing-else fix (rule 15.7), 2 sites under new D.013 (void* ↔ unsigned char* at third-party byte-buffer API boundaries — mbedtls_ssl_write / mbedtls_ssl_read take unsigned char* whereas SolidSyslogStream::Send/Read use void*). Closes #437 and #12.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (8)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughThis PR closes epic E10 by flipping static-analysis gates from warning to error mode and verifying Platform/MbedTls is conformant. It widens CI scope to include the MbedTls adapter, applies a transport-error handling fix, documents a new MISRA deviation for byte-buffer API casts, and removes the frozen conformance audit document. ChangesS10.20 MISRA and Naming Enforcement Close-out
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
☀️ Quality Summary 🚦 build-linux-gcc: 100% successful (✔️ 1300 passed, 🙈 2 skipped) Created by Quality Monitor v1.14.0 (#f3859fd). More details are shown in the GitHub Checks Result. |
Purpose
Closes the E10 enforcement-mode flip and tidies the audit-phase artefacts
that were always slated for removal at the close-out. With S10.12–S10.19
done and
maincarrying 0 cppcheck-misra findings and 0 clang-tidynaming warnings, the gates can flip.
This is the last story under E10 — merging closes both the story (#437)
and the epic (#12).
Change Description
CI gate flips
analyze-cppcheckjob — cppcheck-misra--error-exitcode=0→1onboth the "Run cppcheck-misra" and "Generate cppcheck-misra XML report"
steps. The soft-freeze comment block (referenced the old "S10.18 will
flip" target) replaced with a one-paragraph current-state note.
.clang-tidy—WarningsAsErrors: '*,-readability-identifier-naming'→
'*'. Stale paragraph pruned to a single-line note.Scope additions
Platform/MbedTls/Source/added to both cppcheck-misra invocations(was absent — adapter landed in S08.07 against local-only checks).
Core/Source/only toCore/Source/+Platform/*/Source/(matches cppcheck-misra scope).Build-time cppcheck via
CMAKE_C_CPPCHECKalready gated Platform/;this widens the diagnostic artefact upload to match.
analyze-formatfind roots widened to includePlatform/.MbedTls verification → small cleanup
The MbedTls inclusion surfaced 7 findings (the "verification step only"
framing in the issue body was wrong). All in
SolidSyslogMbedTlsStream.c,all reviewed per-site per the S10.12 conformance recipe:
SelfFromBasedowncastvoid* ctxcastsif/else ifchain missing trailingelseelse { /* n<0 → keep -1 */ }. No behaviour change.(unsigned char*) bufferat mbedTLS byte-buffer APIsNew deviation D.013
void* ↔ unsigned char*at third-party byte-buffer API boundaries.mbedTLS types its byte buffers as
unsigned char*; the project'sSolidSyslogStream::Send/Readuse the conventionalvoid*byte-buffercontract. OpenSSL (
SSL_write/SSL_read) takesvoid*so this nevercame up for
TlsStream.c. Refactoring the Stream API tounsigned char*would propagate to every Stream impl + StreamSender — wrong direction
for one third-party API's typing choice. Cast is well-defined under
C99 §6.5 ¶7 (
unsigned charmay alias any object type). Full rationalein
docs/misra-deviations.md#d013.Audit doc deletion
docs/misra-conformance.mdremoved (frozen since S10.12, slated fordeletion at the gate flip). Live truth lives in
docs/misra-deviations.md(rationales) and
misra_suppressions.txt(per-site state). DEVLOGhistory retains references — point-in-time records, not rewriting.
Mop-up
Tests/DatagramFake.h:18-21comment from the S10.22 deferred listreworded to disambiguate the per-slot default vs the
out-of-
DATAGRAMFAKE_MAX_SEND_CALLSfallback.Test Evidence
Local verification in the gcc dev container:
cppcheck --addon=misra --error-exitcode=1over full Core +Platform/{Atomics,Posix,Windows,OpenSsl,MbedTls,FreeRtos,FatFs}/Source/
with new suppressions →
EXIT=0.cmake --build --preset tidy(which exercisesreadability-identifier-namingunder the newWarningsAsErrors: '*')→
EXIT=0, no warnings.clang-format --dry-run --Werrorover the widenedCore/Interface Core/Source Platform Tests Bdd/Targetstree →EXIT=0.Re-proving that the gates fail on a deliberate violation was considered
and skipped — they fired dozens of times during S10.07–S10.19, so
re-proving in this PR adds churn without information.
Areas Affected
.github/workflows/ci.yml:analyze-cppcheck,analyze-format..clang-tidy: WarningsAsErrors.misra_suppressions.txt(+9 lines),docs/misra-deviations.md(+D.013 section),docs/misra-conformance.md(deleted).
Platform/MbedTls/Source/SolidSyslogMbedTlsStream.c:trailing
else { }inMbedTlsStream_BioRecv, no behaviour change.Tests/DatagramFake.h: comment-only.DEVLOG.md: 2026-05-23 S10.20 entry.No production behaviour change in any shipped artefact.
Closes #437
Closes #12
Summary by CodeRabbit
Bug Fixes
Chores
Documentation