Skip to content
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

Merged
merged 4 commits into from
Jun 23, 2021

Conversation

sharwell
Copy link
Member

@sharwell sharwell commented Jun 22, 2021

Review commit-by-commit recommended.

  • Update to Microsoft.CodeAnalysis.Testing and account for small API changes
  • Add OptionsCollection.Add(OptionsCollection) since AddRange cannot be used in a collection initializer

@sharwell sharwell marked this pull request as ready for review June 22, 2021 21:17
@sharwell sharwell requested review from a team as code owners June 22, 2021 21:17
@sharwell sharwell marked this pull request as draft June 22, 2021 21:17
This is a convenience method for the equivalent of AddRange inside a
collection initializer.
@sharwell sharwell marked this pull request as ready for review June 22, 2021 21:40
else if (_analyzerConfigIndex is { } index)
{
_analyzerConfigIndex = null;
TestState.AnalyzerConfigFiles.RemoveAt(index);
Copy link
Member

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.

Copy link
Member Author

@sharwell sharwell Jun 22, 2021

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);
Copy link
Member

@CyrusNajmabadi CyrusNajmabadi Jun 22, 2021

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.

Copy link
Member Author

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. :\

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trying something different...

@sharwell sharwell merged commit 36930f1 into dotnet:main Jun 23, 2021
@ghost ghost added this to the Next milestone Jun 23, 2021
@sharwell sharwell deleted the update-test-libs branch June 23, 2021 04:00
@RikkiGibson RikkiGibson modified the milestones: Next, 17.0.P2 Jun 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants