Skip to content

chore(linter): Add some unused fix tests for unicorn rules#17475

Merged
graphite-app[bot] merged 1 commit intomainfrom
add-fix-tests-for-unicorn-rules
Dec 30, 2025
Merged

chore(linter): Add some unused fix tests for unicorn rules#17475
graphite-app[bot] merged 1 commit intomainfrom
add-fix-tests-for-unicorn-rules

Conversation

@connorshea
Copy link
Member

@connorshea connorshea commented Dec 30, 2025

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.

Copilot AI review requested due to automatic review settings December 30, 2025 03:31
@connorshea connorshea requested a review from camc314 as a code owner December 30, 2025 03:31
@github-actions github-actions bot added A-linter Area - Linter C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Dec 30, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_ternary rule 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_apis that 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-hq
Copy link

codspeed-hq bot commented Dec 30, 2025

CodSpeed Performance Report

Merging #17475 will not alter performance

Comparing add-fix-tests-for-unicorn-rules (f8cabd7) with main (435e955)1

Summary

✅ 4 untouched
⏩ 41 skipped2

Footnotes

  1. No successful run was found on main (174375d) during the generation of this report, so 435e955 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 41 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@camc314 camc314 self-assigned this Dec 30, 2025
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Dec 30, 2025
Copy link
Contributor

camc314 commented Dec 30, 2025

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.
@graphite-app graphite-app bot force-pushed the add-fix-tests-for-unicorn-rules branch from f8cabd7 to d6ebdd6 Compare December 30, 2025 11:01
@graphite-app graphite-app bot merged commit d6ebdd6 into main Dec 30, 2025
20 checks passed
@graphite-app graphite-app bot deleted the add-fix-tests-for-unicorn-rules branch December 30, 2025 11:06
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Dec 30, 2025
camc314 added a commit that referenced this pull request Jan 29, 2026
this PR adds suggestion for `unicorn/prefer-modern-dom-apis` rule. used
tests from #17475

issue #684

---------

Co-authored-by: Cameron <cameron.clark@hey.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter Area - Linter C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants