chore(linter): Add some unused fix tests for unicorn rules#17475
chore(linter): Add some unused fix tests for unicorn rules#17475graphite-app[bot] merged 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds minor test improvements for unicorn linter rules, aligned with upstream changes. The changes primarily consist of adding TODO comments for future autofix implementations and including additional test cases that were found in the upstream repository.
Key changes:
- Added new test cases for
prefer_logical_operator_over_ternaryrule with multi-line test inputs - Added TODO comments indicating pending autofix implementations for three rules
- Included a commented-out test case for
prefer_modern_math_apisthat needs fixing
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
unicorn_prefer_logical_operator_over_ternary.snap |
Updated snapshot with two new test case outputs for the logical operator preference rule |
prefer_logical_operator_over_ternary.rs |
Added two new failing test cases with multi-line input to ensure proper handling |
prefer_modern_math_apis.rs |
Added a commented-out test case with TODO for complex parentheses handling |
prefer_default_parameters.rs |
Added TODO comment clarifying that autofix is not yet implemented |
prefer_array_find.rs |
Added TODO comment for pending autofix implementation |
prefer_add_event_listener.rs |
Added _fix variable with a test case for future autofix implementation |
The changes are well-structured and appropriately document areas that need future work. No issues were identified during the review.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
CodSpeed Performance ReportMerging #17475 will not alter performanceComparing Summary
Footnotes
|
Merge activity
|
Basically just adding some minor changes from the upstream rules (found by deleting the rules and then re-generating them and looking through the diff in the tests). I had hoped to find more tests for pending fixes, but didn't really find many.
f8cabd7 to
d6ebdd6
Compare
Basically just adding some minor changes from the upstream rules (found by deleting the rules and then re-generating them and looking through the diff in the tests). I had hoped to find more tests for pending fixes, but didn't really find many.