Code fix for CS1615 (Remove 'in' keyword)#44529
Code fix for CS1615 (Remove 'in' keyword)#44529CyrusNajmabadi merged 3 commits intodotnet:masterfrom
Conversation
| M2(in i, s); | ||
| } | ||
| }"); | ||
| } |
There was a problem hiding this comment.
do we have negative tests showing we don't remove in when it should be kept around?
There was a problem hiding this comment.
Something like M2 method in this case?
Or do you mean it would be nice to add more tests for that particular case?
There was a problem hiding this comment.
i'd like a test htat purely verifies the negative scenario and nothing else :)
| <comment>'using' is a C# keyword and should not be localized</comment> | ||
| </data> | ||
| <data name="Remove_in_keyword" xml:space="preserve"> | ||
| <value>Remove 'in' keyword</value> |
There was a problem hiding this comment.
check out the other resource strings. There should be a way to mark in as locked. this will tell the loc team to not localize that word when they do the different languages.
| if (argumentSyntax == null || argumentSyntax.GetRefKind() != RefKind.In) | ||
| return; | ||
|
|
||
| var generator = context.Document.GetRequiredLanguageService<SyntaxGenerator>(); |
There was a problem hiding this comment.
remove this line. you can get the generation inside FixAsync.
CyrusNajmabadi
left a comment
There was a problem hiding this comment.
LGTM with the loc change asked for.
|
@eugenesmlv Is this ready for a final review? |
|
Yes, it is. Is there anything I can improve in this PR? |
|
Thanks! |
Closes #44187
I'm not sure about handling 'in' keyword's trivia. Should we keep it and prepend to the argument or just remove the keyword with its trivia?