Repository navigation
docs(review): forbid new FASTLED_* macros, require FL_* prefix - #3054
Conversation
Marks the FASTLED_* vocabulary as legacy-only / frozen in both the CodeRabbit per-path review instructions and the /code_review skill. Newly introduced macros — #define directives, -D build flags in platformio.ini / meson.build / CMakeLists / workflow YAML, and defined() checks — must use the FL_<COMPONENT>_<NAME> form instead. Triggered by an FL_LPC_* example surfacing -DFASTLED_LPC_PWM_DMA=1 and -DFASTLED_LPC_RX_SCT_WS2812=1 in build_flags; those would now be flagged. Existing FASTLED_* references are grandfathered. Co-Authored-By: Claude Opus 4.7 <[email protected]>
|
Warning Ignoring CodeRabbit configuration file changes. For security, only the configuration from the base branch is applied for open source repositories. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughTwo review-tooling files are updated to enforce macro naming conventions. Both ChangesMacro Naming Enforcement in Review Tooling
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related issues
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 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.claude/commands/code_review.md:
- Around line 179-185: The checklist at lines 179-185 is missing an explicit
grep step for `defined(FASTLED_...)` and `#ifdef FASTLED_...` conditionals, even
though line 170 declares these forms are in scope for enforcement. Add a new
dedicated check step (it can be positioned as step 2 or 3) that greps the diff
for newly added lines matching `^\+.*defined\(FASTLED_` or
`^\+.*`#ifdef`\s+FASTLED_` and flag these as HIGH-severity violations requiring
the `FL_` prefix instead, ensuring the checklist operationalizes all rules
declared in the scope definition.
In @.coderabbit.yaml:
- Around line 63-81: The `.coderabbit.yaml` file currently defines the FASTLED_
vs FL_ prefix rule only for platformio.ini files, but the stated scope of this
coding policy applies across multiple build systems. Add equivalent path-based
instruction blocks to `.coderabbit.yaml` for meson.build, CMakeLists.txt, and
workflow YAML files that enforce the same FASTLED_ macro prefix rule with
HIGH-severity violations for newly added FASTLED_* identifiers. Adapt the
instruction text to reflect each build system's native syntax and conventions
while maintaining the same enforcement logic: flag only brand-new FASTLED_*
identifiers, not existing ones that are merely moved or reformatted.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 5b704a85-82dd-412b-8c7e-03dcc625838a
📒 Files selected for processing (2)
.claude/commands/code_review.md.coderabbit.yaml
Two findings from #3054 review: 1. /code_review checklist now operationalizes the `defined(FASTLED_*)` / `#ifdef FASTLED_*` / `#ifndef FASTLED_*` scope item — added step 3 greps the diff for those preprocessor conditionals introducing brand- new identifiers. 2. .coderabbit.yaml now applies the same `FL_*` vs `FASTLED_*` rule to `**/meson.build`, `**/CMakeLists.txt`, and `.github/workflows/**`, each with build-system-specific examples (add_project_arguments, add_compile_definitions, env.CXXFLAGS, etc.). Previously only platformio.ini was covered. Existing FASTLED_* identifiers remain grandfathered in every block. Co-Authored-By: Claude Opus 4.7 <[email protected]>
Summary
FASTLED_*as legacy / frozen vocabulary in both.coderabbit.yamland the/code_reviewskill (.claude/commands/code_review.md).FASTLED_prefix is a violation; new macros must useFL_<COMPONENT>_<NAME>.platformio.inibuild_flags(-D<NAME>=...),meson.build,CMakeLists.txt, and GitHub Actions YAML — not just C/C++#definelines.FASTLED_*references in a diff are explicitly grandfathered; only brand-new identifiers trip the rule.Triggered by an LPC example whose build_flags read:
Under the new rule, those would be flagged and rewritten to
-DFL_LPC_PWM_DMA=1/-DFL_LPC_RX_SCT_WS2812=1.Test plan
**/platformio.inipath block on the next PR with-DFASTLED_*build_flags/code_reviewslash command surfaces the "NewFASTLED_*macros (should beFL_*)" counter in its summary templateFASTLED_*line (move/reformat) is NOT flagged🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation
FASTLED_*as legacy-only and requiring new capability/config macros to use theFL_*format. Also tightened rules for how capability macro components should be spelled out.Chores
FASTLED_*macro definitions and build flags across common build and CI configurations, ensuring they use the requiredFL_*naming.