-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Enable CA2009: Do not call ToImmutableCollection on an ImmutableCollection value #53141
Conversation
@@ -41,7 +41,7 @@ internal class OnAutoInsertHandler : AbstractStatelessRequestHandler<LSP.Documen | |||
[ImportMany(LanguageNames.VisualBasic)] IEnumerable<IBraceCompletionService> visualBasicBraceCompletionServices) | |||
{ | |||
_csharpBraceCompletionServices = csharpBraceCompletionServices.ToImmutableArray(); | |||
_visualBasicBraceCompletionServices = _visualBasicBraceCompletionServices.ToImmutableArray(); | |||
_visualBasicBraceCompletionServices = visualBasicBraceCompletionServices.ToImmutableArray(); |
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.
This looks like a bug!
@CyrusNajmabadi Any idea what this may have caused and how to test?
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.
Nope. @dibarbet ?
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 wonder if there was a test that could have shown an issue 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.
@CyrusNajmabadi I added a test. Haven't yet verified that it's failing before the change or passing after. Will test
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.
The test I added is unrelated to this line. It's not a brace completion service. Will see if I can figure out a test.
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 can't figure out a test. Most (if not all) of those VB services are unrelated to typing a new line, while OnAutoInsertHandler
calls the services only if the character typed is a new line.
Head branch was pushed to by a user without write access
@CyrusNajmabadi @ryzngard There are unrelated test failures here. Can someone restart them? Thanks! |
@RikkiGibson Yeah it doesn't (screenshot from another PR that has failing checks): |
@CyrusNajmabadi @Youssef1313 is this good to merge? |
@RikkiGibson Yeah it should be. |
Thanks @Youssef1313! |
No description provided.