Simplify type names should fix all diagnostics with the same ID.#26823
Simplify type names should fix all diagnostics with the same ID.#26823jinujoseph merged 5 commits intodotnet:masterfrom
Conversation
| { | ||
| int i1 = 0; | ||
| System.Int16 s1 = 0; | ||
| short s1 = 0; |
There was a problem hiding this comment.
IMO, this behavior is strictly better. The user the "prefer intrinsic types" option set. They then ask to "fix all" the suggestion to use predefined types in tihs file. But we would only fix up one type of type. I can't imagine this being more desirable than the user actually getting all cases fixed up where they can use a predefined type given that that's their optoin and they said 'fix all'.
|
This is currently blocked on the design review in #26532. The discussion of the proposal along with the design discussion result will be added to that issue, and this pull request can be considered if/when the new design is accepted. |
|
@sharwell Sounds good. Do you think you can get this to a design meeting soon? |
|
@CyrusNajmabadi It didn't fit into our time in the last one but we're trying to get through the design backlog as quickly as possible. |
|
@sharwell Can you guys potentially take a look next time? Thanks! |
|
@sharwell @jinujoseph please merge in when convenient. Thanks! |
|
@CyrusNajmabadi This was a while ago, but thank-you again for making this change - so much better! |
|
you're welcome @davkean. Glad it's better! |
Fixes: #26532
Current fix-all for simplify type names only fixes if the ID is the same and the contents of the node are the same. This is not really that helpful, and means when a person sees a huge swath of "simplify name to ..." suggestions in their file ("IDE0001"), they can't actually fix tehm all at one. They need to fix-all over and over again for all the different types they have.
This is basically unlike any of our fix-alls which almost always try to sensibly do their work for all the diagnostics of that same ID.
When reviewed, i recommend going a commit at a time.