Repository navigation
chore(lint): ban decayed array parameters - #3236
Merged
Merged
Conversation
Add a clang-query-backed ratchet for function parameters spelled as C arrays, including ISR-specific diagnostics and a checked-in baseline for existing debt. Update CodeRabbit and FastLED agent review guidance to use array references for ISR APIs and span or array references elsewhere. Closes #3233
|
Caution Review failedAn error occurred during the review process. Please try again later. ✨ 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 |
|
Caution Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted. Error details |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ci/tools/check_array_params.py, a clang-query-backed ratchet for function parameters spelled as C arrays (T value[N]/T value[]).Closes #3233
Follow-up filed while implementing: #3234 audits whether
set_input_gamut(DiodeProfile* profile, ...)should keep mutable pointer semantics or move to references.Verification
uv run pytest ci/tools/test_check_noexcept.py ci/tools/test_check_array_params.py -quv run python ci/tools/check_array_params.py --scope allgit diff --checkwhite_xy[2]towhite_xy[3];uv run python ci/lint_cpp/run_all_checkers.py src/fl/gfx/rgbw.hfailed withArrayParamAstChecker, then the probe was reverted.uv run python ci/lint_cpp/run_all_checkers.py src/fl/gfx/rgbw.hbash lintbash test --cpp(330/330 passed)