Repository navigation
Description
Context
Follow-up from #2983 and the broader #2974 / #2975 bloat work: exception landing-pad metadata is showing up around logging and cleanup paths, so missing FL_NOEXCEPT annotations are not just style drift. The project macro is spelled FL_NOEXCEPT (not FL_NO_EXCEPT).
I checked the current lint/tooling paths and found coverage gaps:
ci/lint_cpp/noexcept_checker.pyclaims to enforceFL_NOEXCEPTon functions insrc/fl/andsrc/platforms/, but it is not imported or instantiated byci/lint_cpp/run_all_checkers.py. The unified runner currently wiresRawNoexceptCheckerandNoexceptSpecialMembersChecker, but notNoexceptFunctionChecker.- That regex checker is not ready to simply wire in as-is: running it standalone reports
3240violations across360files and includes obvious false positives such as local variable declarations that look function-like. - The regex checker also intentionally excludes
.cppand.cpp.hpp, which is where many FastLED implementation functions live. - The AST-backed check is currently separate from normal C++ lint:
ci/lint/stage_impls.py::run_noexcept_check()only runs when--tidyis enabled, skips ifclang-queryis missing, and delegates toci/lint/clang_tidy/noexcept_platforms.py, whose scope is onlysrc/platforms/. ci/tools/check_noexcept.pyalready hasplatforms,fl, andallscopes, but that all-src AST check is not part of the default C++ lint path.
Current local probes on this checkout:
uv run python ci/tools/check_noexcept.py --scope platformsreports15candidate hits in6files. Some are real candidates, but the query also catches lambdas/destructors that need explicit matcher exclusions.uv run python ci/tools/check_noexcept.py --scope flreports622candidate hits in37files, including headers and.cpp.hppimplementations.- bloat: reduce dispatch-loop landing pad count in ChannelEngineRMTImpl::processPendingChannels #2980 already calls out one concrete mismatch:
fl::ChannelData::writeWithPadding(fl::span<u8>)is declaredFL_NOEXCEPTinsrc/fl/channel_data.hbut the definition insrc/fl/channel_data.cpp.hppis missing the specifier.
The functions named in #2983 (createChannel and reconfigureForNetwork in src/platforms/esp/32/drivers/rmt/rmt_5/channel_driver_rmt.cpp.hpp) are already marked FL_NOEXCEPT in the current tree, so this issue is about preventing the next missed implementation function rather than fixing those two directly.
Proposal
Make FL_NOEXCEPT enforcement a precise, normal C++ lint requirement for all FastLED-owned source under src/.
Recommended direction:
- Promote the AST-backed check to cover all owned
src/C++ files, not onlysrc/platforms/. - Run it from the normal C++ lint path, not only
bash lint --tidy. - Keep the check precise enough for CI by excluding known non-actionable AST nodes: lambdas, implicit functions, deleted/defaulted declarations, intentionally unsupported compiler/runtime hooks, and any documented suppressions.
- Decide whether the noisy regex checker should be removed, fixed into a cheap precheck, or kept only as a unit-tested helper outside the unified runner.
- Add regression tests/fixtures that prove new functions in
src/fl,src/platforms, headers, and.cpp.hppimplementation files fail lint when missingFL_NOEXCEPT.
Acceptance criteria
bash lint --cppor the normal unified C++ linter fails for a newly-added non-exempt function undersrc/that lacksFL_NOEXCEPT.- Coverage includes
src/fl/**,src/platforms/**, headers,.cpp, and.cpp.hppimplementation files owned by FastLED. - The checker has explicit, tested exemptions for lambdas, implicit/defaulted/deleted functions, pure toolchain/C ABI hooks that cannot be annotated, and documented suppression comments.
- Existing candidate hits are triaged into either real fixes or documented exemptions; the checker does not land with thousands of regex false positives.
- The
ChannelData::writeWithPaddingdeclaration/definition mismatch noted in bloat: reduce dispatch-loop landing pad count in ChannelEngineRMTImpl::processPendingChannels #2980 is caught by the final lint setup. - CI documentation/help text makes clear whether this is a default lint check or requires a special flag.
Open questions
- Should this remain
clang-querybased, or should it move into the Rust C++ linter once an AST-capable path exists there? - Should
FL_NOEXCEPTbe mandatory for literally every ownedsrc/function, or should there be a small allowlist for platform entry points / C ABI functions where exception specs are not valid or not worth enforcing?
Related issues
- bloat: consolidate error log sites in ChannelEngineRMTImpl::reconfigureForNetwork + createChannel through expected<>::failure #2983: noticed while auditing RMT
createChannel/reconfigureForNetworkbloat. - bloat: reduce dispatch-loop landing pad count in ChannelEngineRMTImpl::processPendingChannels #2980: includes a concrete missed declaration/definition mismatch for
ChannelData::writeWithPadding. - bloat: mark fl::basic_string + fl::sstream dtors noexcept to eliminate per-call-site landing pads #2975: cross-cutting
noexcept/landing-pad bloat context. - Reduce per-symbol bloat in the FastLED 1-4KB function band on ESP32-S3 (logging must stay enabled) #2974: parent bloat meta.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity