-
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
Update to Microsoft.CodeAnalysis.Testing 1.1.0-beta1.21322.2 #54302
Conversation
5a5edf1
to
83ac575
Compare
This is a convenience method for the equivalent of AddRange inside a collection initializer.
else if (_analyzerConfigIndex is { } index) | ||
{ | ||
_analyzerConfigIndex = null; | ||
TestState.AnalyzerConfigFiles.RemoveAt(index); |
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 don't quite get what's going o nhere.
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 code fix tests got more strict, and now verify the before/after contents of .editorconfig. It's expecting the inputs to be declared in TestState.AnalyzerConfigFiles
, but we can't do that since the content is generated dynamically. This code add/updates/removes the AnalyzerConfigFiles
entry generated for Options
.
TestState.AnalyzerConfigFiles.RemoveAt(index); | ||
} | ||
|
||
await base.RunImplAsync(cancellationToken); |
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.
pity about all the duplication in these 4 areas.
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.
Yeah it's a bit of duplication. :\
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.
Trying something different...
...orFeatures/DiagnosticsTestUtilities/CodeActions/VisualBasicCodeRefactoringVerifier`1+Test.cs
Show resolved
Hide resolved
37fe6c1
to
ac79a16
Compare
Review commit-by-commit recommended.
OptionsCollection.Add(OptionsCollection)
sinceAddRange
cannot be used in a collection initializer