Skip to content

refactor: rename prefer_mirror_test_structure rule - #383

Open
solid-illiaaihistov wants to merge 1 commit into
solid-software:masterfrom
solid-illiaaihistov:refactor/rename-prefer-mirror-test-structure
Open

solid-illiaaihistov wants to merge 1 commit into
solid-software:masterfrom
solid-illiaaihistov:refactor/rename-prefer-mirror-test-structure

Conversation

@solid-illiaaihistov

@solid-illiaaihistov solid-illiaaihistov commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Updates
    • Renamed the test-structure lint from prefer_mirror_test_structure to mirror_test_structure.
    • Enabled the renamed lint in the default diagnostics configuration.
    • Updated the package version to 2.0.1.

@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

📝 Walkthrough

The lint identifier and public rule and visitor names changed to mirror_test_structure. The plugin registration, diagnostics configuration, tests, package version, and changelog were updated to use or record the renamed rule.

Changes: Mirror test structure rule rename

Layer / File(s) Summary
Rename rule and visitor
lib/src/lints/mirror_test_structure/mirror_test_structure_rule.dart, lib/src/lints/mirror_test_structure/visitors/mirror_test_structure_visitor.dart
The public rule and visitor classes and constructors use the new names. The lint identifier changed to mirror_test_structure.
Register and validate renamed rule
lib/analysis_options.yaml, lib/main.dart, test/src/lints/mirror_test_structure/*, CHANGELOG.md, pubspec.yaml
The plugin and diagnostics configuration use the renamed rule. Tests target the renamed rule, and the changelog and package version record 2.0.1.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Refactor

Merge Risk: 🔵 Low · up to 7cd99

The rule rename is applied consistently. One open question remains: whether version 2.0.1 is the right number for a renamed lint identifier. No released consumers are known to be affected, so the risk is limited to choosing the release number.

Pre-merge checks · Passed 5
Passed Passed checks (5 passed)
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: renaming the prefer_mirror_test_structure rule.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔇 Additional comments (1)
pubspec.yaml-5-5 (1)

5-5: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

⚠️ Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.

Do not publish this breaking rename as a patch release.

Version 2.0.1 permits an upgrade within the 2.0 release line, but the upgrade removes prefer_mirror_test_structure and PreferMirrorTestStructureRule. Existing consumers can lose the diagnostic or fail to compile. Release the rename as a major version, or retain compatibility aliases for the old names. The changelog documents the rename but does not preserve compatibility.

Based on learnings: Public API renames need a documented migration path when they break compatibility.

Source: Learnings


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 94abe0bd-61b9-4a16-9f6b-506143855cac
📥 Commits

Reviewing files that changed from the base of the PR and between 269474e and 7cd997c.

📒 Files selected for processing (7)
  • CHANGELOG.md
  • lib/analysis_options.yaml
  • lib/main.dart
  • lib/src/lints/mirror_test_structure/mirror_test_structure_rule.dart
  • lib/src/lints/mirror_test_structure/visitors/mirror_test_structure_visitor.dart
  • pubspec.yaml
  • test/src/lints/mirror_test_structure/mirror_test_structure_rule_test.dart

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant