Skip to content

Scope ObjectFLED diagnostic global exemptions - #3906

Merged
zackees merged 1 commit into
masterfrom
fix/3487-objectfled-global-annotations
Aug 19, 2026
Merged

zackees merged 1 commit into
masterfrom
fix/3487-objectfled-global-annotations

Conversation

@zackees

@zackees zackees commented Aug 19, 2026 •

Copy link
Copy Markdown
Member

Summary

  • remove the broad file-wide SingletonElisionChecker waiver from ObjectFLED diagnostics
  • document each of the eight existing diagnostic globals with a precise, declaration-scoped exemption
  • preserve constant initialization, direct access, and linker garbage collection instead of adding a lazy Singleton pointer and null-check overhead

Resolution

Issue #3487's maintainer audit established that these globals have static initialization, internal linkage, no non-trivial destruction, and are already eligible for --gc-sections. The originally requested Singleton migration would add storage and indirection without improving elision. This PR makes that audited decision enforceable while ensuring future globals are not silently masked by a file-wide waiver.

Verification

  • �ash test tests/platforms/arm/teensy/teensy4_common/drivers/objectfled/channel_engine_objectfled.cpp`n- �ash lint --cpp (this file absent from SingletonElisionChecker output)
  • git diff --check`n- clud-review: clean after wording follow-up

Fixes #3487

Summary by CodeRabbit

  • Chores
    • Improved lint configuration for diagnostic state variables.
    • No changes to exported functionality or end-user behavior.

@zackees
zackees merged commit e652336 into master Aug 19, 2026
8 of 14 checks passed
@zackees
zackees deleted the fix/3487-objectfled-global-annotations branch August 19, 2026 03:46
@coderabbitai

coderabbitai Bot commented Aug 19, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 5f208678-cd25-423e-b4bb-61154b5cad33

📥 Commits

Reviewing files that changed from the base of the PR and between a098852 and d57ed54.

📒 Files selected for processing (1)
  • src/platforms/arm/teensy/teensy4_common/drivers/objectfled/objectfled_diagnostics.cpp.hpp

📝 Walkthrough

Walkthrough

The ObjectFLED diagnostics header removes its file-level global-variable lint suppression and adds targeted FL_LINT_ALLOW_GLOBAL annotations for each diagnostic state variable.

Changes

ObjectFLED diagnostic lint handling

Layer / File(s) Summary
Annotate diagnostic state variables
src/platforms/arm/teensy/teensy4_common/drivers/objectfled/objectfled_diagnostics.cpp.hpp
Adds individual FL_LINT_ALLOW_GLOBAL annotations for the internal diagnostic state variables. Removes the file-level suppression.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related issues

  • FastLED/FastLED issue 3481: Covers migration of the same ObjectFLED diagnostic globals to fl::Singleton<T>; this change instead adds targeted lint suppressions.

Possibly related PRs

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/3487-objectfled-global-annotations

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Aug 19, 2026
@fastled-project-sync fastled-project-sync Bot moved this from Triage to Done in FastLED Tracker Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

singleton: migrate objectfled_diagnostics snapshot state (Tier 1d)

1 participant