-
Notifications
You must be signed in to change notification settings - Fork 751
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
Remove the type from the text generated by the Extract to constant
code action
#42643
Conversation
Extract to constant
code action
Extract to constant
code actionExtract to constant
code action
This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the |
This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the |
This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the |
This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the |
This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the |
This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the |
This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the |
This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #42643 +/- ##
============================================
- Coverage 77.52% 77.50% -0.02%
- Complexity 58588 58589 +1
============================================
Files 3438 3438
Lines 219218 219221 +3
Branches 28921 28916 -5
============================================
- Hits 169948 169911 -37
- Misses 39850 39890 +40
Partials 9420 9420 ☔ View full report in Codecov by Sentry. |
Purpose
As described in ballerina-platform/ballerina-dev-website#8884, it is the best practice to opt out using the type symbol when declaring a constant. With this PR, the
Extract to constant
code action is modified to reflect this change.Fixes #42041
Approach
Removed appending the type symbol to the generated text edit.
Samples
Screen.Recording.2024-04-26.at.9.46.15.AM.mov
Remarks
In the ballerina-platform/ballerina-dev-website#8884, there are some scenarios in which having the type symbol in the declaration can be beneficial. However, the revised design does not consider those cases due to the following points.
Hence, it is up to the user to add the type symbol if it is necessary.
Check List