refactor: prefix the cross-TU lifecycle functions - #800
Conversation
Every <Class>_Initialise and <Class>_Cleanup has external linkage and is declared in a *Private.h header, so docs/NAMING.md puts it at Tier 1 and requires the SolidSyslog prefix. Eighty-seven functions across Core and the nine platform packs carried the Tier 2 form instead. The _Report helpers in the same headers are static inline, so they keep the Tier 2 form and are untouched. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
☀️ Quality Summary Created by Quality Monitor v4.15.0 (#82d77af). More details are shown in the GitHub Checks Result. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Essentials Run ID: 📒 Files selected for processing (137)
WalkthroughThe pull request renames lifecycle initialisation and cleanup functions across core and platform implementations to use fully qualified ChangesLifecycle API renaming
Estimated code review effort: 2 (Simple) | ~10 minutes ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Purpose
docs/NAMING.mddecides Tier 1 by linkage, not by whether an integrator calls theidentifier: anything with external linkage takes the
SolidSyslogprefix. Every<Class>_Initialiseand<Class>_Cleanupbreaks that rule. They are declared in*Private.h, defined in<Class>.cand called from<Class>Static.c, so they haveexternal linkage and the unprefixed form is the symbol collision the rule exists to
prevent — an integrator building from a Path B manifest gets every object in one
directory.
No issue behind this; it was found reviewing #799.
Change Description
Eighty-seven functions renamed to
SolidSyslog<Class>_Initialise/SolidSyslog<Class>_Cleanupacross Core and the nine platform packs. Mechanicalprefix addition — no signature, no call graph and no behaviour changes.
The
_Reporthelpers that sit beside them in the same headers arestatic inline,so their linkage is internal and the Tier 2 form they carry is correct. They are
untouched.
Two documentation code samples name one of the renamed functions, so both were
swept with the code: the pool-Create worked example in
docs/porting.mdand theTier 2 example in
docs/NAMING.md.scripts/check_references.pythen rejecteddocs/porting.md— the symbol now beginsSolidSyslogand resolves only in aprivate header — so it gains an
ALLOWEDentry alongside the twoSolidSyslogPoolAllocator_*entries already there for the same example.misra_suppressions.txtis renumbered for the lines clang-format reflowed.This is the safe half of the naming work. The 44
*ErrorSourceobjects declared inpublic
*Errors.hheaders break the same rule, but integrators match on theiraddress, so renaming them is an API break and follows separately inside the 0.2.0
break window.
Test Evidence
No new tests — a rename with no behaviour change, covered by the existing suites.
debugpreset, gcc image: 1526 tests, 3659 checks, 0 failures.debugpreset,cpputest-freertosimage: green, so the FreeRTOS, lwIP, Plus-TCP,Plus-FAT, FatFs and mbedTLS trees the gcc image skips are covered.
cppcheck-misrainvocation reproduced locally: exit 0, the same sixpre-existing findings as the branch base and no new ones.
check_references.py,check_platform_docs.py,check_spdx_headers.py: green.Areas Affected
Core/Source/, all ninePlatform/*/Source/trees, the unit tests that name thefunctions in comments,
docs/porting.md,docs/NAMING.md,scripts/check_references.py,misra_suppressions.txt. No public header changes,so no impact on integrators or on the example repositories.
Summary by CodeRabbit
Refactor
Documentation
Chores