You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Coding standard, static analysis tooling, and MISRA C:2012 conformance
for the SolidSyslog source tree.
This epic owns three intertwined concerns:
Naming convention — a per-tier identifier scheme that satisfies
MISRA C:2012 rules 5.1–5.9 and reads consistently across the codebase
(see docs/NAMING.md).
Static analysis tooling — clang-tidy readability-identifier-naming
for naming shape, cppcheck-misra for MISRA rules, with a clean split so
the two tools cannot disagree on the same name.
MISRA C:2012 conformance — informed compliance per tier rather than
blanket conformance; per-tier rule subset with documented deviations.
Full chosen subset; per-file deviations where third-party APIs force them
Platform/*/Source/
Consistency-only
New code follows conventions; CppUTest macros used as-is; no rename sweep of existing tests
Excluded
Tests/
Out of scope
Not enforced
Not enforced
Bdd/, ci/, docs/, .github/, .devcontainer/
Enforcement gates run per tier — clang-tidy and cppcheck-misra are invoked
with different rule sets for Strict, Pragmatic, and Consistency-only paths.
Approach
Foundations first (commit standards + wire tools in warning mode), then
audit and decision, then cross-cutting sweeps and per-group conformance,
then flip to error-mode enforcement.
Soft freeze on feature work during conformance: new code must comply
with the rules from day 1 (caught by tooling); existing code converges via
controlled refactor PRs in parallel. Feature work continues.
S10.03 — cppcheck-misra addon wired into CI. Warning mode.
S10.04 — .clang-format review (line length, brace style, MISRA-helpful settings — trailing comma rules, no single-line if, etc.). Format-the-tree commit as part of the same PR.
Audit & decide — done
S10.05 — Generate naming + MISRA violation reports; commit a categorised backlog under docs/misra-conformance.md.
S10.06 — Curate the MISRA rule subset (enable now / minor fix / deviate / parked) and finalise docs/misra-deviations.md (D.002–D.010 + suppressions list).
S10.07 — Enum constants and tags renamed to Class_PascalCase. Later reversed by S10.22 — see below.
S10.08 — Static-function Class_ prefix sweep (~811 statics across Core/Source + Platform/*/Source; rule 5.9 cleared as a structural consequence).
S10.09 — Data-member lowerCamelCase → PascalCase (Tier 4 sweep, ~186 sites). Surfaced when S10.05 flipped MemberCase to PascalCase; details in docs/misra-conformance.md.
S10.10 — Mechanical MISRA sweep (~130 fixes across 10 rules: 10.4, 10.1, 15.7, 12.1, 5.6, 10.8, 2.5, 14.4, 7.1, 3.1 + Rule 5.6 _Static_assert polyfill). Two new deviations introduced as byproducts: D.010 (20.10 stringify) and D.011 (2.5 public-API macros).
S10.11 — this-pointer convention: self for own-type pointers, base for base-class view at vtable boundaries; SelfFromBase / SelfFromStorage static-inline helpers per derived class; NAMING.md Tier 3 amendment + tree-wide sweep.
S10.21 — Soften NAMING.md abbreviation rule (broaden the Tier 3 domain-term exemption to RFC-spec field names, protocol shorthands, POSIX/Win32 idioms; Tier 4 cross-reference added). Docs-only — replaces the wider abbreviation-purge originally planned as S10.09.
S10.22 — Enum naming convention restoration: all enum constants reverted to SOLIDSYSLOG_SCREAMING_SNAKE (tagged or anonymous, public or TU-local). Single .clang-tidyEnumConstantCase: UPPER_CASE rule with no IgnoredRegexp escape. Settled after S10.16 review surfaced a third hybrid form that the post-S10.07 two-class system could not mechanically prevent.
Per-group conformance (pilot first, then in size order)
Per-group workflow established by the S10.12 pilot recipe: per-site review of every existing
suppression in scope (not blind extension), and per-site review of every new finding. Extending
already-documented deviations is allowed; new deviations are not introduced inside a per-group
story without explicit discussion.
S10.15 — Structured data (StructuredData, MetaSd, OriginSd, TimeQualitySd). Done.
S10.16 — Senders (Sender, NullSender, UdpSender, StreamSender, SwitchingSender, UdpPayload, plus the E11 *Private.h / *Static.c split TUs). Done.
S10.17 — Network primitives: Datagram, Stream, Resolver, Address, Sleep, plus their POSIX / Windows / FreeRTOS / OpenSSL impls. The biggest per-group story by file count. Done.
S10.18 — Storage stack: Store, BlockStore, RecordStore, BlockSequence, BlockDevice, FileBlockDevice, File, plus POSIX / Windows / FatFs file impls. Done.
S10.19 — Engine + Formatter: SolidSyslog.c, Config.h, Formatter, Prival, Utf8, plus any residual files not covered by S10.12–S10.18. Done.
Widen non-MISRA cppcheck XML pass scope from Core/Source/ to Core/Source/ + Platform/*/Source/ (deferred from S10.03). Build-time cppcheck already gates Platform/ via CMAKE_C_CPPCHECK; this widens the artefact upload to match.
Add Platform/MbedTls/Source/ to the cppcheck-misra invocation (currently absent from CI scope; the MbedTLS adapter was developed against the warning-mode check locally so this is a verification step, not a sweep).
Flip cppcheck-misra --error-exitcode=0 → 1 on both the Run and Generate-XML steps so MISRA findings fail CI.
Flip clang-tidy readability-identifier-naming from warning to error (currently exempted in WarningsAsErrors).
Delete docs/misra-conformance.md (frozen since S10.12; live record is docs/misra-deviations.md + misra_suppressions.txt).
Widen analyze-format CI scope to include Platform/ (currently only checks Core/Interface Core/Source Tests Bdd/Targets).
Coding standard, static analysis tooling, and MISRA C:2012 conformance
for the SolidSyslog source tree.
This epic owns three intertwined concerns:
MISRA C:2012 rules 5.1–5.9 and reads consistently across the codebase
(see
docs/NAMING.md).readability-identifier-namingfor naming shape, cppcheck-misra for MISRA rules, with a clean split so
the two tools cannot disagree on the same name.
blanket conformance; per-tier rule subset with documented deviations.
Scope tiers
Core/Interface/,Core/Source/,Platform/*/Interface/Platform/*/Source/Tests/Bdd/,ci/,docs/,.github/,.devcontainer/Enforcement gates run per tier — clang-tidy and cppcheck-misra are invoked
with different rule sets for Strict, Pragmatic, and Consistency-only paths.
Approach
Foundations first (commit standards + wire tools in warning mode), then
audit and decision, then cross-cutting sweeps and per-group conformance,
then flip to error-mode enforcement.
Soft freeze on feature work during conformance: new code must comply
with the rules from day 1 (caught by tooling); existing code converges via
controlled refactor PRs in parallel. Feature work continues.
Stories
Foundations — done
docs/NAMING.md+ initialdocs/misra-deviations.md(5.1 → 63 chars deviation). Cross-reference from CLAUDE.md / SKILL.md..clang-tidyfiles (Strict / Pragmatic / Consistency-only / Disabled). Warning mode in CI..clang-formatreview (line length, brace style, MISRA-helpful settings — trailing comma rules, no single-lineif, etc.). Format-the-tree commit as part of the same PR.Audit & decide — done
docs/misra-conformance.md.docs/misra-deviations.md(D.002–D.010 + suppressions list).Cross-cutting sweeps — done (each spans Strict + Pragmatic tiers)
Class_PascalCase. Later reversed by S10.22 — see below.Class_prefix sweep (~811 statics across Core/Source + Platform/*/Source; rule 5.9 cleared as a structural consequence).MemberCasetoPascalCase; details indocs/misra-conformance.md._Static_assertpolyfill). Two new deviations introduced as byproducts: D.010 (20.10 stringify) and D.011 (2.5 public-API macros).this-pointer convention:selffor own-type pointers,basefor base-class view at vtable boundaries;SelfFromBase/SelfFromStoragestatic-inline helpers per derived class; NAMING.md Tier 3 amendment + tree-wide sweep.SOLIDSYSLOG_SCREAMING_SNAKE(tagged or anonymous, public or TU-local). Single.clang-tidyEnumConstantCase: UPPER_CASErule with noIgnoredRegexpescape. Settled after S10.16 review surfaced a third hybrid form that the post-S10.07 two-class system could not mechanically prevent.Per-group conformance (pilot first, then in size order)
Per-group workflow established by the S10.12 pilot recipe: per-site review of every existing
suppression in scope (not blind extension), and per-site review of every new finding. Extending
already-documented deviations is allowed; new deviations are not introduced inside a per-group
story without explicit discussion.
NullBuffer,CircularBuffer,PosixMessageQueueBuffer). Done.Endpoint,Transport,Tunables,StringFunction,Error/ErrorMessages,Clock,Hostname,ProcessId,SysUpTime). Done.StructuredData,MetaSd,OriginSd,TimeQualitySd). Done.Sender,NullSender,UdpSender,StreamSender,SwitchingSender,UdpPayload, plus the E11*Private.h/*Static.csplit TUs). Done.Datagram,Stream,Resolver,Address,Sleep, plus their POSIX / Windows / FreeRTOS / OpenSSL impls. The biggest per-group story by file count. Done.Store,BlockStore,RecordStore,BlockSequence,BlockDevice,FileBlockDevice,File, plus POSIX / Windows / FatFs file impls. Done.SolidSyslog.c,Config.h,Formatter,Prival,Utf8, plus any residual files not covered by S10.12–S10.18. Done.Enforcement — close-out
Core/Source/toCore/Source/+Platform/*/Source/(deferred from S10.03). Build-time cppcheck already gates Platform/ viaCMAKE_C_CPPCHECK; this widens the artefact upload to match.Platform/MbedTls/Source/to the cppcheck-misra invocation (currently absent from CI scope; the MbedTLS adapter was developed against the warning-mode check locally so this is a verification step, not a sweep).--error-exitcode=0→1on both the Run and Generate-XML steps so MISRA findings fail CI.readability-identifier-namingfrom warning to error (currently exempted inWarningsAsErrors).docs/misra-conformance.md(frozen since S10.12; live record isdocs/misra-deviations.md+misra_suppressions.txt).analyze-formatCI scope to includePlatform/(currently only checksCore/Interface Core/Source Tests Bdd/Targets).Tests/DatagramFake.hcomment nit from PR refactor: S10.22 enum naming convention restoration (SCREAMING_SNAKE) #391 (the misra-conformance.md nit goes away when the file is deleted above).Deliverables
docs/NAMING.md— naming convention referencedocs/misra-deviations.md— documented rule deviations with rationale.clang-tidyconfigurationsmisra_suppressions.txt— per-site cppcheck-misra suppressions, deviation-groupedCore/,Platform/*/Interface/,Platform/*/Source/