-
-
Notifications
You must be signed in to change notification settings - Fork 6
Enable FixIt to update existing initializer rather than always providing a new one #164
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #164 +/- ##
========================================
Coverage 99.91% 99.91%
========================================
Files 32 32
Lines 3461 3699 +238
========================================
+ Hits 3458 3696 +238
Misses 3 3
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests LGTM
self.receivedA = receivedA | ||
receivedB = ReceivedB() | ||
} | ||
init(forwardedA: ForwardedA, receivedA: ReceivedA, receivedB: ReceivedB, customizable: String = "") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it also add public
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess will just do two passes on fix-its right now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally yes, but today we just do one fix at a time. There will be new fixit once the first fixit is applied.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you beat me to it 😉
#164 introduced an issue where a fixit to add new parameters to an initializer would repeat any closure parameters in the list. This PR addresses that issue.
When an
@Instantiable
does not have a properly formattedinit
, and one of the type'sinit
methods only is missing arguments or has incorrect/missing accessibility modifiers, our FixIt now updates an existinginit
method rather than creating a new one.