Skip to content

Commit

Permalink
Merge master branch
Browse files Browse the repository at this point in the history
  • Loading branch information
BertanAygun committed Apr 8, 2020
2 parents eea9a19 + 00247a7 commit 8ad8a8e
Show file tree
Hide file tree
Showing 105 changed files with 910 additions and 579 deletions.
5 changes: 0 additions & 5 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,11 @@
<configuration>
<packageSources>
<clear />
<add key="dotnet-core" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" />
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
<add key="dotnet5" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json" />
<add key="system-commandline" value="https://dotnet.myget.org/F/system-commandline/api/v3/index.json" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="myget-dotnet-coreclr" value="https://dotnet.myget.org/F/dotnet-coreclr/api/v3/index.json" />
<add key="myget-dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
<add key="dotnet-corefxtestdata" value="https://dotnet.myget.org/F/dotnet-corefxtestdata/api/v3/index.json" />
<add key="dotnet-buildtools" value="https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json" />
<add key="experimental-vs-packages" value="https://dotnet.myget.org/F/experimental-vs-packages/api/v3/index.json" />
<add key="symreader-native" value="https://dotnet.myget.org/F/symreader-native/api/v3/index.json" />
<add key="interactive-window" value="https://dotnet.myget.org/F/interactive-window/api/v3/index.json" />
Expand Down
6 changes: 3 additions & 3 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
-->
<PropertyGroup>
<MajorVersion>3</MajorVersion>
<MinorVersion>6</MinorVersion>
<MinorVersion>7</MinorVersion>
<PatchVersion>0</PatchVersion>
<PreReleaseVersionLabel>3</PreReleaseVersionLabel>
<PreReleaseVersionLabel>1</PreReleaseVersionLabel>
<VersionPrefix>$(MajorVersion).$(MinorVersion).$(PatchVersion)</VersionPrefix>
<!--
By default the assembly version in official builds is "$(MajorVersion).$(MinorVersion).0.0".
Expand All @@ -29,7 +29,7 @@
<!-- Versions used by several individual references below -->
<RoslynDiagnosticsNugetPackageVersion>3.0.0-beta2.20169.3</RoslynDiagnosticsNugetPackageVersion>
<CodeStyleLayerCodeAnalysisVersion>3.3.1</CodeStyleLayerCodeAnalysisVersion>
<MicrosoftCodeAnalysisTestingVersion>1.0.1-beta1.20126.2</MicrosoftCodeAnalysisTestingVersion>
<MicrosoftCodeAnalysisTestingVersion>1.0.1-beta1.20206.1</MicrosoftCodeAnalysisTestingVersion>
<CodeStyleAnalyzerVersion>3.6.0-2.20157.5</CodeStyleAnalyzerVersion>
<VisualStudioEditorPackagesVersion>16.4.248</VisualStudioEditorPackagesVersion>
<ILToolsPackageVersion>5.0.0-alpha1.19409.1</ILToolsPackageVersion>
Expand Down
3 changes: 3 additions & 0 deletions src/Analyzers/CSharp/Analyzers/CSharpAnalyzers.projitems
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<Compile Include="$(MSBuildThisFileDirectory)FileHeaders\CSharpFileHeaderDiagnosticAnalyzer.cs" />
<Compile Include="$(MSBuildThisFileDirectory)FileHeaders\CSharpFileHeaderHelper.cs" />
<Compile Include="$(MSBuildThisFileDirectory)InlineDeclaration\CSharpInlineDeclarationDiagnosticAnalyzer.cs" />
<Compile Include="$(MSBuildThisFileDirectory)InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessAnalyzer.cs" />
<Compile Include="$(MSBuildThisFileDirectory)MakeLocalFunctionStatic\MakeLocalFunctionStaticDiagnosticAnalyzer.cs" />
<Compile Include="$(MSBuildThisFileDirectory)MakeLocalFunctionStatic\MakeLocalFunctionStaticHelper.cs" />
<Compile Include="$(MSBuildThisFileDirectory)MakeStructFieldsWritable\CSharpMakeStructFieldsWritableDiagnosticAnalyzer.cs" />
Expand All @@ -36,6 +37,7 @@
<Compile Include="$(MSBuildThisFileDirectory)PopulateSwitch\CSharpPopulateSwitchStatementDiagnosticAnalyzer.cs" />
<Compile Include="$(MSBuildThisFileDirectory)RemoveUnreachableCode\CSharpRemoveUnreachableCodeDiagnosticAnalyzer.cs" />
<Compile Include="$(MSBuildThisFileDirectory)RemoveUnreachableCode\RemoveUnreachableCodeHelpers.cs" />
<Compile Include="$(MSBuildThisFileDirectory)SimplifyBooleanExpression\CSharpSimplifyConditionalDiagnosticAnalyzer.cs" />
<Compile Include="$(MSBuildThisFileDirectory)SimplifyInterpolation\CSharpSimplifyInterpolationDiagnosticAnalyzer.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UseAutoProperty\CSharpUseAutoPropertyAnalyzer.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UseCoalesceExpression\CSharpUseCoalesceExpressionDiagnosticAnalyzer.cs" />
Expand Down Expand Up @@ -75,6 +77,7 @@
<Compile Include="$(MSBuildThisFileDirectory)UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.Result.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UseIndexOrRangeOperator\Helpers.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UseIndexOrRangeOperator\MemberInfo.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UseInferredMemberName\CSharpUseInferredMemberNameDiagnosticAnalyzer.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UseIsNullCheck\CSharpUseIsNullCheckForCastAndEqualityOperatorDiagnosticAnalyzer.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UseIsNullCheck\CSharpUseIsNullCheckForReferenceEqualsDiagnosticAnalyzer.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UseNullPropagation\CSharpUseNullPropagationDiagnosticAnalyzer.cs" />
Expand Down
3 changes: 3 additions & 0 deletions src/Analyzers/CSharp/Analyzers/CSharpAnalyzersResources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,9 @@
<data name="Use_range_operator" xml:space="preserve">
<value>Use range operator</value>
</data>
<data name="Delegate_invocation_can_be_simplified" xml:space="preserve">
<value>Delegate invocation can be simplified.</value>
</data>
<data name="Inline_variable_declaration" xml:space="preserve">
<value>Inline variable declaration</value>
</data>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public InvokeDelegateWithConditionalAccessAnalyzer()
: base(IDEDiagnosticIds.InvokeDelegateWithConditionalAccessId,
CSharpCodeStyleOptions.PreferConditionalDelegateCall,
LanguageNames.CSharp,
new LocalizableResourceString(nameof(CSharpFeaturesResources.Delegate_invocation_can_be_simplified), CSharpFeaturesResources.ResourceManager, typeof(CSharpFeaturesResources)))
new LocalizableResourceString(nameof(CSharpAnalyzersResources.Delegate_invocation_can_be_simplified), CSharpAnalyzersResources.ResourceManager, typeof(CSharpAnalyzersResources)))
{
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ private void ReportDiagnosticsIfNeeded(NameColonSyntax nameColon, SyntaxNodeAnal
var preference = options.GetOption(
CodeStyleOptions2.PreferInferredTupleNames, context.Compilation.Language, syntaxTree, cancellationToken);
if (!preference.Value ||
!CSharpInferredMemberNameReducer.CanSimplifyTupleElementName(argument, parseOptions))
!CSharpInferredMemberNameSimplifier.CanSimplifyTupleElementName(argument, parseOptions))
{
return;
}
Expand Down Expand Up @@ -82,7 +82,7 @@ private void ReportDiagnosticsIfNeeded(NameEqualsSyntax nameEquals, SyntaxNodeAn
var preference = options.GetOption(
CodeStyleOptions2.PreferInferredAnonymousTypeMemberNames, context.Compilation.Language, syntaxTree, cancellationToken);
if (!preference.Value ||
!CSharpInferredMemberNameReducer.CanSimplifyAnonymousTypeMemberName(anonCtor))
!CSharpInferredMemberNameSimplifier.CanSimplifyAnonymousTypeMemberName(anonCtor))
{
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
<target state="new">Deconstruct variable declaration</target>
<note />
</trans-unit>
<trans-unit id="Delegate_invocation_can_be_simplified">
<source>Delegate invocation can be simplified.</source>
<target state="new">Delegate invocation can be simplified.</target>
<note />
</trans-unit>
<trans-unit id="Indexing_can_be_simplified">
<source>Indexing can be simplified</source>
<target state="new">Indexing can be simplified</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
<target state="new">Deconstruct variable declaration</target>
<note />
</trans-unit>
<trans-unit id="Delegate_invocation_can_be_simplified">
<source>Delegate invocation can be simplified.</source>
<target state="new">Delegate invocation can be simplified.</target>
<note />
</trans-unit>
<trans-unit id="Indexing_can_be_simplified">
<source>Indexing can be simplified</source>
<target state="new">Indexing can be simplified</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
<target state="new">Deconstruct variable declaration</target>
<note />
</trans-unit>
<trans-unit id="Delegate_invocation_can_be_simplified">
<source>Delegate invocation can be simplified.</source>
<target state="new">Delegate invocation can be simplified.</target>
<note />
</trans-unit>
<trans-unit id="Indexing_can_be_simplified">
<source>Indexing can be simplified</source>
<target state="new">Indexing can be simplified</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
<target state="new">Deconstruct variable declaration</target>
<note />
</trans-unit>
<trans-unit id="Delegate_invocation_can_be_simplified">
<source>Delegate invocation can be simplified.</source>
<target state="new">Delegate invocation can be simplified.</target>
<note />
</trans-unit>
<trans-unit id="Indexing_can_be_simplified">
<source>Indexing can be simplified</source>
<target state="new">Indexing can be simplified</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
<target state="new">Deconstruct variable declaration</target>
<note />
</trans-unit>
<trans-unit id="Delegate_invocation_can_be_simplified">
<source>Delegate invocation can be simplified.</source>
<target state="new">Delegate invocation can be simplified.</target>
<note />
</trans-unit>
<trans-unit id="Indexing_can_be_simplified">
<source>Indexing can be simplified</source>
<target state="new">Indexing can be simplified</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
<target state="new">Deconstruct variable declaration</target>
<note />
</trans-unit>
<trans-unit id="Delegate_invocation_can_be_simplified">
<source>Delegate invocation can be simplified.</source>
<target state="new">Delegate invocation can be simplified.</target>
<note />
</trans-unit>
<trans-unit id="Indexing_can_be_simplified">
<source>Indexing can be simplified</source>
<target state="new">Indexing can be simplified</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
<target state="new">Deconstruct variable declaration</target>
<note />
</trans-unit>
<trans-unit id="Delegate_invocation_can_be_simplified">
<source>Delegate invocation can be simplified.</source>
<target state="new">Delegate invocation can be simplified.</target>
<note />
</trans-unit>
<trans-unit id="Indexing_can_be_simplified">
<source>Indexing can be simplified</source>
<target state="new">Indexing can be simplified</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
<target state="new">Deconstruct variable declaration</target>
<note />
</trans-unit>
<trans-unit id="Delegate_invocation_can_be_simplified">
<source>Delegate invocation can be simplified.</source>
<target state="new">Delegate invocation can be simplified.</target>
<note />
</trans-unit>
<trans-unit id="Indexing_can_be_simplified">
<source>Indexing can be simplified</source>
<target state="new">Indexing can be simplified</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
<target state="new">Deconstruct variable declaration</target>
<note />
</trans-unit>
<trans-unit id="Delegate_invocation_can_be_simplified">
<source>Delegate invocation can be simplified.</source>
<target state="new">Delegate invocation can be simplified.</target>
<note />
</trans-unit>
<trans-unit id="Indexing_can_be_simplified">
<source>Indexing can be simplified</source>
<target state="new">Indexing can be simplified</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
<target state="new">Deconstruct variable declaration</target>
<note />
</trans-unit>
<trans-unit id="Delegate_invocation_can_be_simplified">
<source>Delegate invocation can be simplified.</source>
<target state="new">Delegate invocation can be simplified.</target>
<note />
</trans-unit>
<trans-unit id="Indexing_can_be_simplified">
<source>Indexing can be simplified</source>
<target state="new">Indexing can be simplified</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
<target state="new">Deconstruct variable declaration</target>
<note />
</trans-unit>
<trans-unit id="Delegate_invocation_can_be_simplified">
<source>Delegate invocation can be simplified.</source>
<target state="new">Delegate invocation can be simplified.</target>
<note />
</trans-unit>
<trans-unit id="Indexing_can_be_simplified">
<source>Indexing can be simplified</source>
<target state="new">Indexing can be simplified</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
<target state="new">Deconstruct variable declaration</target>
<note />
</trans-unit>
<trans-unit id="Delegate_invocation_can_be_simplified">
<source>Delegate invocation can be simplified.</source>
<target state="new">Delegate invocation can be simplified.</target>
<note />
</trans-unit>
<trans-unit id="Indexing_can_be_simplified">
<source>Indexing can be simplified</source>
<target state="new">Indexing can be simplified</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
<target state="new">Deconstruct variable declaration</target>
<note />
</trans-unit>
<trans-unit id="Delegate_invocation_can_be_simplified">
<source>Delegate invocation can be simplified.</source>
<target state="new">Delegate invocation can be simplified.</target>
<note />
</trans-unit>
<trans-unit id="Indexing_can_be_simplified">
<source>Indexing can be simplified</source>
<target state="new">Indexing can be simplified</target>
Expand Down
2 changes: 2 additions & 0 deletions src/Analyzers/CSharp/CodeFixes/CSharpCodeFixes.projitems
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<Compile Include="$(MSBuildThisFileDirectory)ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)FileHeaders\CSharpFileHeaderCodeFixProvider.cs" />
<Compile Include="$(MSBuildThisFileDirectory)InlineDeclaration\CSharpInlineDeclarationCodeFixProvider.cs" />
<Compile Include="$(MSBuildThisFileDirectory)InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessCodeFixProvider.cs" />
<Compile Include="$(MSBuildThisFileDirectory)MakeFieldReadonly\CSharpMakeFieldReadonlyCodeFixProvider.cs" />
<Compile Include="$(MSBuildThisFileDirectory)MakeStructFieldsWritable\CSharpMakeStructFieldsWritableCodeFixProvider.cs" />
<Compile Include="$(MSBuildThisFileDirectory)MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs" />
Expand Down Expand Up @@ -48,6 +49,7 @@
<Compile Include="$(MSBuildThisFileDirectory)UseIndexOrRangeOperator\CSharpUseIndexOperatorCodeFixProvider.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UseIndexOrRangeOperator\CSharpUseRangeOperatorCodeFixProvider.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UseIndexOrRangeOperator\Helpers.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UseInferredMemberName\CSharpUseInferredMemberNameCodeFixProvider.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UseIsNullCheck\CSharpUseIsNullCheckForCastAndEqualityOperatorCodeFixProvider.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UseIsNullCheck\CSharpUseIsNullCheckForReferenceEqualsCodeFixProvider.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UseNullPropagation\CSharpUseNullPropagationCodeFixProvider.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@ private static void HandleVariableAndIfStatementForm(
cancellationToken.ThrowIfCancellationRequested();
}

private class MyCodeAction : CodeAction.DocumentChangeAction
private class MyCodeAction : CustomCodeActions.DocumentChangeAction
{
public MyCodeAction(Func<CancellationToken, Task<Document>> createChangedDocument)
: base(CSharpFeaturesResources.Delegate_invocation_can_be_simplified, createChangedDocument)
: base(CSharpAnalyzersResources.Delegate_invocation_can_be_simplified, createChangedDocument)
{
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,16 @@
<Compile Include="$(MSBuildThisFileDirectory)ConvertAnonymousTypeToTuple\ConvertAnonymousTypeToTupleTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)InlineDeclaration\CSharpInlineDeclarationTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)InlineDeclaration\CSharpInlineDeclarationTests_FixAllTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessTests_FixAllTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)MakeFieldReadonly\MakeFieldReadonlyTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)MakeLocalFunctionStatic\MakeLocalFunctionStaticTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)MakeStructFieldsWritable\MakeStructFieldsWritableTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProviderTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)OrderModifiers\OrderModifiersCompilerErrorTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)OrderModifiers\OrderModifiersTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)RemoveUnreachableCode\RemoveUnreachableCodeTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)SimplifyBooleanExpression\SimplifyConditionalTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)SimplifyInterpolation\SimplifyInterpolationTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UseAutoProperty\UseAutoPropertyTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UseCoalesceExpression\UseCoalesceExpressionForNullableTests.cs" />
Expand Down Expand Up @@ -68,6 +71,7 @@
<Compile Include="$(MSBuildThisFileDirectory)UseImplicitOrExplicitType\UseImplicitTypeTests_FixAllTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UseIndexOrRangeOperator\UseIndexOperatorTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UseIndexOrRangeOperator\UseRangeOperatorTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UseInferredMemberName\UseInferredMemberNameTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UseIsNullCheck\UseIsNullCheckForCastAndEqualityOperatorTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UseIsNullCheck\UseIsNullCheckForReferenceEqualsTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UseExplicitTupleName\UseExplicitTupleNameTests.cs" />
Expand Down
Loading

0 comments on commit 8ad8a8e

Please sign in to comment.