Skip to content

Move bunch of analyzer base types and test utility types into shared …#41992

Merged
2 commits merged intodotnet:masterfrom
mavasani:MoveToSharedLayer
Feb 28, 2020
Merged

Move bunch of analyzer base types and test utility types into shared …#41992
2 commits merged intodotnet:masterfrom
mavasani:MoveToSharedLayer

Conversation

@mavasani
Copy link
Copy Markdown
Contributor

…layer

@mavasani mavasani added this to the 16.6 milestone Feb 27, 2020
@mavasani mavasani requested a review from a team as a code owner February 27, 2020 21:11
Comment thread Compilers.sln
EndProject
Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "vbi", "src\Interactive\vbi\vbi.vbproj", "{706CFC25-B6E0-4DAA-BCC4-F6FAAFEEDF87}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities", "src\CodeStyle\Core\Tests\Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities.csproj", "{21A59DB8-E9E0-42EB-A599-457C5BC87FC3}"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Renaming Microsoft.CodeAnalysis.CodeStyle.UnitTests to Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities is the core change to the sln file and the only compiler layer change. Other changes got pulled in by VS automatically.

using Microsoft.CodeAnalysis.Diagnostics;
using Microsoft.CodeAnalysis.Options;

#if CODE_STYLE
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

All the #if CODE_STYLE added in this PR are temporary until Sam's changes unifies options infrastructure in shared layer.

/// <param name="tagIndices">
/// a map of location tag to index in additional locations.
/// <see cref="AbstractRemoveUnnecessaryParenthesesDiagnosticAnalyzer{TLanguageKindEnum, TParenthesizedExpressionSyntax}"/> for an example of usage.
/// "AbstractRemoveUnnecessaryParenthesesDiagnosticAnalyzer" for an example of usage.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We can revert this change once this analyzer is moved to the shared analyzers layer.

<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing.XUnit" Version="$(MicrosoftCodeAnalysisCSharpCodeFixTestingXUnitVersion)" />
</ItemGroup>
<ItemGroup Label="Project References">
<!-- Directly reference the Workspaces project so we always test against the latest Roslyn bits -->
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This change is needed to ensure that we always run Code style tests against the latest Roslyn Compiler and Workspaces bits.

@mavasani
Copy link
Copy Markdown
Contributor Author

mavasani commented Feb 27, 2020

@CyrusNajmabadi Seems like your last PR merge causes a build break (#41416). All the subsequent PRs are failing with the following nullability error in AbstractUseNullPropagationCodeFixProvider:

src\Features\Core\Portable\UseNullPropagation\AbstractUseNullPropagationCodeFixProvider.cs(92,130): error CS8604: Possible null reference argument for parameter 'semanticModel' in 'SyntaxNode? AbstractUseNullPropagationDiagnosticAnalyzer<TSyntaxKind, TExpressionSyntax, TConditionalExpressionSyntax, TBinaryExpressionSyntax, TInvocationExpression, TMemberAccessExpression, TConditionalAccessExpression, TElementAccessExpression>.GetWhenPartMatch(ISyntaxFactsService syntaxFacts, ISemanticFactsService semanticFacts, SemanticModel semanticModel, SyntaxNode expressionToMatch, SyntaxNode whenPart)'.

Comment thread src/CodeStyle/Core/CodeFixes/Microsoft.CodeAnalysis.CodeStyle.Fixes.csproj Outdated
@CyrusNajmabadi
Copy link
Copy Markdown
Contributor

@CyrusNajmabadi Seems like your last PR merge causes a build break (#41416). All the subsequent PRs are failing with the following nullability error in AbstractUseNullPropagationCodeFixProvider:

I don't understand how that's possible. The PR was totally passing green. Does our CI system allow merging in without revalidating the PR against master? Seems like a big hole if so.

@mavasani
Copy link
Copy Markdown
Contributor Author

@CyrusNajmabadi Not sure. However, #42001 should fix the break.

@mavasani mavasani closed this Feb 28, 2020
@mavasani mavasani reopened this Feb 28, 2020
Copy link
Copy Markdown

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Auto-approval

@ghost ghost merged commit 916b15d into dotnet:master Feb 28, 2020
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants