-
-
Notifications
You must be signed in to change notification settings - Fork 286
fix: freezed_missing_mixin on private types due to leading underscore #1279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
WalkthroughThe changes update the mixin name construction logic in the Freezed lint package to handle private class names correctly. A new example demonstrates this behavior, including its generated code, showcasing proper mixin usage and pattern matching functionality for a Freezed data class. Changes
Sequence Diagram(s)sequenceDiagram
participant Developer
participant Linter
participant FreezedClass
Developer->>Linter: Defines Freezed class (possibly private)
Linter->>Linter: Constructs expected mixin name (removes leading _ if present)
Linter->>FreezedClass: Checks for correct mixin inclusion
FreezedClass-->>Linter: Provides mixin usage
Linter-->>Developer: Reports missing or correct mixin usage
Estimated code review effort2 (~15 minutes) Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
🧠 Learnings (1)📓 Common learnings✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
🧰 Additional context used🧠 Learnings (1)📓 Common learnings🔇 Additional comments (2)
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
Make sure to add a test for this :) |
7bbfefc to
7022540
Compare
|
@rrousselGit oops I didn't realize there were tests because I had badly misread how they work, should be added now. |
Private types get their leading underscore stripped off, but the lint wasn't accounting for that, so it would end up trying to change the type name to one that does not actually exist.
7022540 to
e5a7ba5
Compare
Private types get their leading underscore stripped off, but the lint wasn't accounting for that, so it would end up trying to change the type name to one that does not actually exist.
Summary by CodeRabbit
New Features
Bug Fixes