提交 40e2a0c8 编写于 作者: M Manish Vasani

Move Roslyn to newer toolset packages (#10312)

* Move Roslyn to newer toolset packages

1. Move to 1.2.1 compiler toolset package.
2. Move to 1.2.0-beta1 analyzer packages.
3. Turn on IOperation feature flag for all projects as the new analyzer packages have IOperation based analyzers.

* Use the Roslyn wide default CA rulesets for newly added samples project.

* Fix couple of test projects to use the Roslyn wide rulesets for code analysis.

* Move to analyzers 1.2.0-beta2 packages (multiple fixes and enhancements to Roslyn diagnostic analyzers)

* Revert accidental file mode changes.

* Move shipped implicit constructors to public API shipped files.

Fixes #11446
上级 3f1aa6e3
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Common diagnostic rules for all analyzer projects" Description="Enables/disable rules specific to all analyzer projects." ToolsVersion="14.0">
<Include Path=".\Roslyn.ruleset" Action="Default" />
<!-- Enable rule RS1007 (Provide localizable arguments to diagnostic descriptor constructor). -->
<Rules AnalyzerId="Roslyn.Diagnostics.Analyzers.CSharp" RuleNamespace="Roslyn.Diagnostics.Analyzers.MetaAnalyzers.CSharp">
<Rule Id="RS1007" Action="Warning" />
</Rules>
<Rules AnalyzerId="Roslyn.Diagnostics.Analyzers.VisualBasic" RuleNamespace="Roslyn.Diagnostics.Analyzers.MetaAnalyzers.VisualBasic">
<Rule Id="RS1007" Action="Warning" />
</Rules>
</RuleSet>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Common diagnostic rules for all analyzer projects" Description="Enables/disable rules specific to all analyzer projects." ToolsVersion="14.0">
<Include Path=".\Roslyn_BuildRules.ruleset" Action="Default" />
<Rules AnalyzerId="Microsoft.CodeAnalysis.Analyzers" RuleNamespace="Microsoft.CodeAnalysis.Analyzers.MetaAnalyzers">
<Rule Id="RS1001" Action="Warning" />
<Rule Id="RS1002" Action="Warning" />
<Rule Id="RS1003" Action="Warning" />
<Rule Id="RS1004" Action="Warning" />
<Rule Id="RS1005" Action="Warning" />
<Rule Id="RS1006" Action="Warning" />
<Rule Id="RS1007" Action="Warning" />
<Rule Id="RS1008" Action="Warning" />
<Rule Id="RS1009" Action="Error" />
<Rule Id="RS1010" Action="Warning" />
<Rule Id="RS1011" Action="Warning" />
<Rule Id="RS1012" Action="Warning" />
<Rule Id="RS1013" Action="Warning" />
<Rule Id="RS1014" Action="Warning" />
</Rules>
<!-- Enable rule RS1007 (Provide localizable arguments to diagnostic descriptor constructor). -->
<Rules AnalyzerId="Microsoft.CodeAnalysis.CSharp.Analyzers" RuleNamespace="Microsoft.CodeAnalysis.CSharp.Analyzers.MetaAnalyzers">
<Rule Id="RS1007" Action="Warning" />
</Rules>
<Rules AnalyzerId="Microsoft.CodeAnalysis.VisualBasic.Analyzers" RuleNamespace="Microsoft.CodeAnalysis.VisualBasic.Analyzers.MetaAnalyzers">
<Rule Id="RS1007" Action="Warning" />
</Rules>
</RuleSet>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Ruleset for Roslyn analyzer projects when explicitly running Code Analysis." Description="These rule are identical to the minimum recommended ruleset, but specific roslyn performance rules have been turned off." ToolsVersion="14.0">
<!-- Include all analyzer project build rules -->
<Include Path=".\AnalyzerProject_BuildRules.ruleset" Action="Default" />
<!-- Include all FxCop minimum recommended rules -->
<Include Path=".\Core_RunCodeAnalysisRules.ruleset" Action="Default" />
</RuleSet>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Ruleset for Roslyn test projects." Description="These rule are identical to the minimum recommended ruleset, but specific roslyn performance rules have been turned off." ToolsVersion="14.0">
<!-- Include all non-shipping project rules -->
<Include Path="..\src\Tools\Microsoft.CodeAnalysis.Toolset.Open\Rulesets\NonShippingProjectRules.ruleset" Action="Default" />
<RuleSet Name="Core ruleset to turn on FxCop rules when explicitly Running Code Analysis." Description="These rule are identical to the minimum recommended ruleset, but specific roslyn performance rules have been turned off." ToolsVersion="14.0">
<Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed">
<Rule Id="CA1001" Action="Warning" />
<Rule Id="CA1009" Action="Warning" />
......@@ -40,22 +39,16 @@
<Rule Id="CA2241" Action="Warning" />
<Rule Id="CA2242" Action="Warning" />
</Rules>
<!-- Review: Why are we turning these off? -->
<Rules AnalyzerId="Roslyn.Diagnostics.Analyzers" RuleNamespace="Roslyn.Diagnostics.Analyzers">
<Rule Id="RS0008" Action="None" />
<Rule Id="RS0011" Action="None" />
</Rules>
<Rules AnalyzerId="Roslyn.Diagnostics.Analyzers.CSharp" RuleNamespace="Roslyn.Diagnostics.Analyzers.CSharp">
<Rule Id="RS0001" Action="None" />
<Rule Id="RS0002" Action="None" />
<Rule Id="RS0005" Action="None" />
<Rule Id="RS0007" Action="None" />
<Rule Id="RS0014" Action="None" />
<Rule Id="RS0003" Action="None" />
</Rules>
<Rules AnalyzerId="Roslyn.Diagnostics.Analyzers.VisualBasic" RuleNamespace="Roslyn.Diagnostics.Analyzers.VisualBasic">
<Rule Id="RS0001" Action="None" />
<Rule Id="RS0002" Action="None" />
<Rule Id="RS0005" Action="None" />
<Rule Id="RS0007" Action="None" />
<Rule Id="CA1067" Action="None" />
<Rule Id="CA1068" Action="None" />
<Rule Id="CA1825" Action="None" />
<Rule Id="CA2007" Action="None" />
</Rules>
</RuleSet>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Common diagnostic rules for all non-shipping projects" Description="Enables/disable rules specific to all non-shipping projects." ToolsVersion="14.0">
<Include Path=".\roslyn.ruleset" Action="Default" />
<Rules AnalyzerId="Roslyn.Diagnostics.Analyzers.CSharp" RuleNamespace="Roslyn.Diagnostics.Analyzers.CSharp">
<Include Path=".\Roslyn_BuildRules.ruleset" Action="Default" />
<Rules AnalyzerId="Microsoft.ApiDesignGuidelines.Analyzers" RuleNamespace="Microsoft.ApiDesignGuidelines.Analyzers">
<!-- For tests, the ConfigureAwait(true) is good enough. Either they are already running on a thread pool
thread where ConfigureAwait(false) does nothing, or we're running the workload from an STA thread
where we want to marshal the continuations back to it. -->
<Rule Id="RS0003" Action="None" />
<Rule Id="RS0007" Action="None" />
<Rule Id="CA2007" Action="None" />
</Rules>
<Rules AnalyzerId="Roslyn.Diagnostics.Analyzers.MetaAnalyzers" RuleNamespace="Roslyn.Diagnostics.Analyzers.MetaAnalyzers">
<Rules AnalyzerId="System.Runtime.Analyzers" RuleNamespace="System.Runtime.Analyzers">
<!-- Avoid zero length allocations - suppress for non-shipping/test projects (originally RS0007) -->
<Rule Id="CA1825" Action="None" />
<!-- Do not use Enumerable methods on indexable collections - suppressed because we have lot of violations in non-shipping/test projects.
We can fix all violations once we have a code fix with fix all, and then remove this suppression.
-->
<Rule Id="RS0014" Action="None" />
</Rules>
<Rules AnalyzerId="Microsoft.CodeAnalysis.Analyzers" RuleNamespace="Microsoft.CodeAnalysis.Analyzers">
<Rule Id="RS1001" Action="None" />
</Rules>
<Rules AnalyzerId="Roslyn.Diagnostics.Analyzers.VisualBasic" RuleNamespace="Roslyn.Diagnostics.Analyzers.VisualBasic">
<!-- See above comment under CSharp -->
<Rule Id="RS0003" Action="None" />
<Rule Id="RS0007" Action="None" />
<Rules AnalyzerId="System.Runtime.Analyzers" RuleNamespace="System.Runtime.Analyzers">
<!-- Do not use generic CodeAction.Create to create CodeAction - not useful for tests -->
<Rule Id="RS0005" Action="None" />
</Rules>
</RuleSet>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Ruleset for Roslyn non-shipping projects when explicitly running Code Analysis." Description="These rule are identical to the minimum recommended ruleset, but specific roslyn performance rules have been turned off." ToolsVersion="14.0">
<!-- Include all non-shipping project build rules -->
<Include Path=".\NonShippingProject_BuildRules.ruleset" Action="Default" />
<!-- Include all FxCop minimum recommended rules -->
<Include Path=".\Core_RunCodeAnalysisRules.ruleset" Action="Default" />
</RuleSet>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Common diagnostic rules for all Roslyn projects"
Description="This file contains diagnostic settings used by all Roslyn projects. Projects that need specific settings should have their own rule set files that Include this one, and then make the necessary adjustments."
ToolsVersion="14.0">
<Rules AnalyzerId="Roslyn.Core" RuleNamespace="Roslyn.Core">
<Rule Id="AD0001" Action="Error" />
</Rules>
</RuleSet>
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Common diagnostic rules to run during build for all shipping Roslyn projects" Description="This file contains diagnostic settings used by all Roslyn projects. Projects that need specific settings should have their own rule set files that Include this one, and then make the necessary adjustments." ToolsVersion="14.0">
<IncludeAll Action="Hidden" />
<Rules AnalyzerId="Microsoft.ApiDesignGuidelines.Analyzers" RuleNamespace="Microsoft.ApiDesignGuidelines.Analyzers">
<Rule Id="CA1000" Action="None" />
<Rule Id="CA1001" Action="None" />
<Rule Id="CA1010" Action="None" />
<Rule Id="CA1016" Action="None" />
<Rule Id="CA1018" Action="None" />
<Rule Id="CA1028" Action="None" />
<Rule Id="CA1030" Action="None" />
<Rule Id="CA1032" Action="None" />
<Rule Id="CA1034" Action="None" />
<Rule Id="CA1036" Action="None" />
<Rule Id="CA1040" Action="None" />
<Rule Id="CA1041" Action="None" />
<Rule Id="CA1043" Action="None" />
<Rule Id="CA1051" Action="None" />
<Rule Id="CA1052" Action="None" />
<Rule Id="CA1054" Action="None" />
<Rule Id="CA1055" Action="None" />
<Rule Id="CA1056" Action="None" />
<Rule Id="CA1064" Action="None" />
<Rule Id="CA1065" Action="None" />
<Rule Id="CA1066" Action="None" />
<Rule Id="CA1067" Action="Warning" />
<Rule Id="CA1068" Action="Warning" />
<Rule Id="CA1304" Action="None" />
<Rule Id="CA1707" Action="None" />
<Rule Id="CA1710" Action="None" />
<Rule Id="CA1714" Action="None" />
<Rule Id="CA1715" Action="None" />
<Rule Id="CA1716" Action="None" />
<Rule Id="CA1717" Action="None" />
<Rule Id="CA1720" Action="None" />
<Rule Id="CA1721" Action="None" />
<Rule Id="CA1724" Action="None" />
<Rule Id="CA1815" Action="None" />
<Rule Id="CA2007" Action="Warning" />
<Rule Id="CA2211" Action="None" />
<Rule Id="CA2218" Action="None" />
<Rule Id="CA2222" Action="None" />
<Rule Id="CA2224" Action="None" />
<Rule Id="CA2225" Action="None" />
<Rule Id="CA2227" Action="None" />
<Rule Id="CA2231" Action="None" />
<Rule Id="CA2234" Action="None" />
</Rules>
<Rules AnalyzerId="Microsoft.CodeAnalysis.Analyzers" RuleNamespace="Microsoft.CodeAnalysis.Analyzers">
<Rule Id="RS1001" Action="None" />
<Rule Id="RS1002" Action="None" />
<Rule Id="RS1003" Action="None" />
<Rule Id="RS1004" Action="None" />
<Rule Id="RS1005" Action="None" />
<Rule Id="RS1006" Action="None" />
<Rule Id="RS1008" Action="None" />
<Rule Id="RS1009" Action="None" />
<Rule Id="RS1010" Action="None" />
<Rule Id="RS1011" Action="None" />
<Rule Id="RS1012" Action="None" />
<Rule Id="RS1013" Action="None" />
<Rule Id="RS1014" Action="Warning" />
</Rules>
<Rules AnalyzerId="Microsoft.Composition.Analyzers" RuleNamespace="Microsoft.Composition.Analyzers">
<Rule Id="RS0006" Action="Error" />
<Rule Id="RS0023" Action="Error" />
</Rules>
<Rules AnalyzerId="Roslyn.Core" RuleNamespace="Roslyn.Core">
<Rule Id="AD0001" Action="Error" />
</Rules>
<Rules AnalyzerId="Roslyn.Diagnostic.Analyzers" RuleNamespace="Roslyn.Diagnostics.Analyzers">
<Rule Id="RS0001" Action="Warning" />
<Rule Id="RS0002" Action="Warning" />
<Rule Id="RS0005" Action="Warning" />
<Rule Id="RS0016" Action="Error" />
<Rule Id="RS0017" Action="Error" />
<Rule Id="RS0022" Action="Error" />
<Rule Id="RS0024" Action="Error" />
<Rule Id="RS0025" Action="Error" />
<Rule Id="RS0026" Action="Error" />
<Rule Id="RS0027" Action="Error" />
</Rules>
<Rules AnalyzerId="System.Collections.Immutable.Analyzers" RuleNamespace="System.Collections.Immutable.Analyzers">
<Rule Id="RS0012" Action="Warning" />
</Rules>
<Rules AnalyzerId="System.Runtime.Analyzers" RuleNamespace="System.Runtime.Analyzers">
<Rule Id="CA1305" Action="None" />
<Rule Id="CA1307" Action="None" />
<Rule Id="CA1308" Action="None" />
<Rule Id="CA1810" Action="None" />
<Rule Id="CA1816" Action="None" />
<Rule Id="CA1825" Action="Warning" />
<Rule Id="CA2002" Action="None" />
<Rule Id="CA2207" Action="None" />
<Rule Id="CA2208" Action="None" />
<Rule Id="CA2216" Action="None" />
<Rule Id="CA2219" Action="None" />
<Rule Id="CA2241" Action="None" />
<Rule Id="CA2242" Action="None" />
<Rule Id="RS0014" Action="Warning" />
</Rules>
<Rules AnalyzerId="System.Runtime.InteropServices.Analyzers" RuleNamespace="System.Runtime.InteropServices.Analyzers">
<Rule Id="CA1401" Action="None" />
<Rule Id="CA2101" Action="None" />
<Rule Id="RS0015" Action="Warning" />
</Rules>
<Rules AnalyzerId="System.Threading.Tasks.Analyzers" RuleNamespace="System.Threading.Tasks.Analyzers">
<Rule Id="RS0018" Action="Warning" />
</Rules>
<Rules AnalyzerId="XmlDocumentationComments.Analyzers" RuleNamespace="XmlDocumentationComments.Analyzers">
<Rule Id="RS0010" Action="Warning" />
</Rules>
</RuleSet>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Ruleset for shipping Roslyn projects when explicitly running Code Analysis." Description="These rule are identical to the minimum recommended ruleset, but specific roslyn performance rules have been turned off." ToolsVersion="14.0">
<!-- Include all shipping Roslyn project build rules -->
<Include Path=".\Roslyn_BuildRules.ruleset" Action="Default" />
<!-- Include all FxCop minimum recommended rules -->
<Include Path=".\Core_RunCodeAnalysisRules.ruleset" Action="Default" />
</RuleSet>
\ No newline at end of file
......@@ -21,8 +21,9 @@
<!-- Import the global NuGet packages -->
<PropertyGroup>
<ToolsetCompilerPackageName>Microsoft.Net.Compilers</ToolsetCompilerPackageName>
<ToolsetCompilerPropsFilePath>$(NuGetPackageRoot)\Microsoft.Net.Compilers\1.2.0-rc\build\Microsoft.Net.Compilers.props</ToolsetCompilerPropsFilePath>
<RoslynDiagnosticsPropsFilePath>$(NuGetPackageRoot)\Microsoft.Net.RoslynDiagnostics\1.1.1-beta1-20150818-01\build\Microsoft.Net.RoslynDiagnostics.props</RoslynDiagnosticsPropsFilePath>
<ToolsetCompilerPropsFilePath>$(NuGetPackageRoot)\Microsoft.Net.Compilers\1.2.1\build\Microsoft.Net.Compilers.props</ToolsetCompilerPropsFilePath>
<RoslynDiagnosticsNugetPackageVersion>1.2.0-beta2</RoslynDiagnosticsNugetPackageVersion>
<RoslynDiagnosticsPropsFilePath>$(NuGetPackageRoot)\Microsoft.Net.RoslynDiagnostics\$(RoslynDiagnosticsNugetPackageVersion)\build\Microsoft.Net.RoslynDiagnostics.props</RoslynDiagnosticsPropsFilePath>
<RoslynBuildUtilFilePath>$(NuGetPackageRoot)\Roslyn.Build.Util\0.9.4-portable\lib\dotnet\Roslyn.MSBuild.Util.dll</RoslynBuildUtilFilePath>
<AdditionalFileItemNames>$(AdditionalFileItemNames);PublicAPI</AdditionalFileItemNames>
</PropertyGroup>
......
......@@ -7,15 +7,49 @@
<OutputPath>$(OutDir)</OutputPath>
<DocumentationFile Condition="'$(DocumentationFile)' == '' AND '$(NoDocumentationFile)' != 'true' AND '$(Nonshipping)' != 'true' AND '$(ProjectLanguage)' == 'VB' AND '$(AssemblyName)' != ''">$(AssemblyName).xml</DocumentationFile>
<DocumentationFile Condition="'$(DocumentationFile)' == '' AND '$(NoDocumentationFile)' != 'true' AND '$(Nonshipping)' != 'true' AND '$(ProjectLanguage)' == 'CSharp' AND '$(AssemblyName)' != ''">$(OutputPath)$(AssemblyName).xml</DocumentationFile>
<CodeAnalysisRuleSet Condition="'$(CodeAnalysisRuleSet)' == '' AND '$(NonShipping)' == 'true'">$(VSLToolsPath)\Rulesets\NonShippingProjectRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(CodeAnalysisRuleSet)' == '' AND '$(AnalyzerProject)' == 'true'">$(VSLToolsPath)\Rulesets\AnalyzerProjectRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(CodeAnalysisRuleSet)' == ''">$(VSLToolsPath)\Rulesets\Roslyn.ruleset</CodeAnalysisRuleSet>
<RoslynPublicKey>0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9</RoslynPublicKey>
<RoslynInternalKey>002400000480000094000000060200000024000052534131000400000100010055e0217eb635f69281051f9a823e0c7edd90f28063eb6c7a742a19b4f6139778ee0af438f47aed3b6e9f99838aa8dba689c7a71ddb860c96d923830b57bbd5cd6119406ddb9b002cf1c723bf272d6acbb7129e9d6dd5a5309c94e0ff4b2c884d45a55f475cd7dba59198086f61f5a8c8b5e601c0edbf269733f6f578fc8579c2</RoslynInternalKey>
</PropertyGroup>
<!-- If the project hasn't configured a ruleset, set a default ruleset. -->
<Choose>
<When Condition="'$(CodeAnalysisRuleSet)' == ''">
<Choose>
<!-- We have different default rulesets for Build versus Running Code Analysis. -->
<When Condition="'$(RunCodeAnalysis)'=='true' OR '$(RunCodeAnalysisOnce)'=='true'">
<PropertyGroup>
<DefaultRulesetSuffix>_RunCodeAnalysisRules</DefaultRulesetSuffix>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<DefaultRulesetSuffix>_BuildRules</DefaultRulesetSuffix>
</PropertyGroup>
</Otherwise>
</Choose>
<PropertyGroup>
<CodeAnalysisRuleSet Condition="'$(CodeAnalysisRuleSet)' == '' AND '$(NonShipping)' == 'true'">$(VSLToolsPath)\Rulesets\NonShippingProject$(DefaultRulesetSuffix).ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(CodeAnalysisRuleSet)' == '' AND '$(AnalyzerProject)' == 'true'">$(VSLToolsPath)\Rulesets\AnalyzerProject$(DefaultRulesetSuffix).ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(CodeAnalysisRuleSet)' == ''">$(VSLToolsPath)\Rulesets\Roslyn$(DefaultRulesetSuffix).ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
</When>
</Choose>
<!-- Enable IOperation feature for IOperation based analyzers. -->
<Choose>
<When Condition="$(Features) == ''">
<PropertyGroup>
<Features>IOperation</Features>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<Features>IOperation,$(Features)</Features>
</PropertyGroup>
</Otherwise>
</Choose>
<!-- settings for strong name signing -->
<PropertyGroup>
<RunningInMicroBuild Condition="Exists('$(TF_BUILD_BUILDDIRECTORY)\MicroBuild\MicroBuild.Signing.dll')">true</RunningInMicroBuild>
......
......@@ -4,8 +4,8 @@
"Microsoft.CodeAnalysis.Test.Resources.Proprietary": "1.2.0-beta1-20160105-04",
"Microsoft.Build.Mono.Debug": "14.1.0",
"Microsoft.DiaSymReader.Native": "1.4.0-rc",
"Microsoft.Net.Compilers": "1.2.0-rc",
"Microsoft.Net.RoslynDiagnostics": "1.1.1-beta1-20150818-01",
"Microsoft.Net.Compilers": "1.2.1",
"Microsoft.Net.RoslynDiagnostics": "1.2.0-beta2",
"FakeSign": "0.9.2",
"xunit": "2.1.0-beta4-build3109",
"xunit.runner.console": "2.1.0-beta4-build3109",
......
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Diagnostic rules for the CSharpCodeAnalysis (Portable and Desktop) projects" Description="Enables rules specific to these projects." ToolsVersion="14.0">
<!-- Include default rules -->
<Include Path="..\..\..\build\Rulesets\Roslyn.ruleset" Action="Default" />
<Include Path="..\..\..\build\Rulesets\Roslyn_BuildRules.ruleset" Action="Default" />
<Rules AnalyzerId="Roslyn.Diagnostics.Analyzers.CSharp" RuleNamespace="Roslyn.Diagnostics.Analyzers.CSharp">
<Rule Id="RS0013" Action="Warning" />
</Rules>
......
......@@ -5,7 +5,7 @@
namespace Microsoft.CodeAnalysis.CSharp
{
[SuppressMessage("Performance", "RS0008", Justification = "Equality not actually implemented")]
[SuppressMessage("Performance", "CA1067", Justification = "Equality not actually implemented")]
internal struct BinaryOperatorAnalysisResult
{
public readonly Conversion LeftConversion;
......
......@@ -7,7 +7,7 @@
namespace Microsoft.CodeAnalysis.CSharp
{
[SuppressMessage("Performance", "RS0008", Justification = "Equality not actually implemented")]
[SuppressMessage("Performance", "CA1067", Justification = "Equality not actually implemented")]
internal struct MemberAnalysisResult
{
// put these first for better packing
......
......@@ -8,7 +8,7 @@ namespace Microsoft.CodeAnalysis.CSharp
/// <summary>
/// Represents the results of overload resolution for a single member.
/// </summary>
[SuppressMessage("Performance", "RS0008", Justification = "Equality not actually implemented")]
[SuppressMessage("Performance", "CA1067", Justification = "Equality not actually implemented")]
internal struct MemberResolutionResult<TMember> where TMember : Symbol
{
private readonly TMember _member;
......
......@@ -106,10 +106,13 @@ Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode.Kind() -> Microsoft.CodeAnalysis.
Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter
Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.CSharpSyntaxRewriter(bool visitIntoStructuredTrivia = false) -> void
Microsoft.CodeAnalysis.CSharp.CSharpSyntaxTree
Microsoft.CodeAnalysis.CSharp.CSharpSyntaxTree.CSharpSyntaxTree() -> void
Microsoft.CodeAnalysis.CSharp.CSharpSyntaxTree.CloneNodeAsRoot<T>(T node) -> T
Microsoft.CodeAnalysis.CSharp.CSharpSyntaxTree.GetCompilationUnitRoot(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> Microsoft.CodeAnalysis.CSharp.Syntax.CompilationUnitSyntax
Microsoft.CodeAnalysis.CSharp.CSharpSyntaxVisitor
Microsoft.CodeAnalysis.CSharp.CSharpSyntaxVisitor.CSharpSyntaxVisitor() -> void
Microsoft.CodeAnalysis.CSharp.CSharpSyntaxVisitor<TResult>
Microsoft.CodeAnalysis.CSharp.CSharpSyntaxVisitor<TResult>.CSharpSyntaxVisitor() -> void
Microsoft.CodeAnalysis.CSharp.CSharpSyntaxWalker
Microsoft.CodeAnalysis.CSharp.CSharpSyntaxWalker.CSharpSyntaxWalker(Microsoft.CodeAnalysis.SyntaxWalkerDepth depth = Microsoft.CodeAnalysis.SyntaxWalkerDepth.Node) -> void
Microsoft.CodeAnalysis.CSharp.CSharpSyntaxWalker.Depth.get -> Microsoft.CodeAnalysis.SyntaxWalkerDepth
......
......@@ -59,21 +59,17 @@
</ItemGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CodeAnalysisRuleSet>..\..\..\..\..\build\TestProjectRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CodeAnalysisRuleSet>..\..\..\..\..\build\TestProjectRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|ARM' ">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PlatformTarget>ARM</PlatformTarget>
<CodeAnalysisRuleSet>..\..\..\..\..\build\TestProjectRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|ARM' ">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PlatformTarget>ARM</PlatformTarget>
<CodeAnalysisRuleSet>..\..\..\..\..\build\TestProjectRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Compile Include="Attributes\AttributeTests.cs" />
......
......@@ -19,7 +19,6 @@
<TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
<NoStdLib>true</NoStdLib>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CodeAnalysisRuleSet>..\..\..\..\..\build\TestProjectRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup Label="Build Items">
<SyntaxTestDefinition Include="..\..\Portable\Syntax\Syntax.xml" />
......
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Diagnostic rules for the CodeAnalysis (Portable and Desktop) projects" Description="Enables rules specific to these projects." ToolsVersion="14.0">
<!-- Include default rules -->
<Include Path="..\..\..\build\Rulesets\Roslyn.ruleset" Action="Default" />
<Include Path="..\..\..\build\Rulesets\Roslyn_BuildRules.ruleset" Action="Default" />
<Rules AnalyzerId="Roslyn.Diagnostics.Analyzers.CSharp" RuleNamespace="Roslyn.Diagnostics.Analyzers.CSharp">
<Rule Id="RS0013" Action="Warning" />
</Rules>
......
......@@ -95,7 +95,7 @@
</ProjectReference>
</ItemGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<NoWarn>1591;RS0007</NoWarn>
<NoWarn>1591</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
</PropertyGroup>
......
......@@ -6,7 +6,7 @@
namespace Microsoft.Cci
{
[SuppressMessage("Performance", "RS0008", Justification = "Equality not actually implemented")]
[SuppressMessage("Performance", "CA1067", Justification = "Equality not actually implemented")]
[DebuggerDisplay("{" + nameof(GetDebuggerDisplay) + "(),nq}")]
internal struct SequencePoint
{
......
......@@ -10,6 +10,7 @@ Microsoft.CodeAnalysis.Accessibility.ProtectedOrFriend = 5 -> Microsoft.CodeAnal
Microsoft.CodeAnalysis.Accessibility.ProtectedOrInternal = 5 -> Microsoft.CodeAnalysis.Accessibility
Microsoft.CodeAnalysis.Accessibility.Public = 6 -> Microsoft.CodeAnalysis.Accessibility
Microsoft.CodeAnalysis.AdditionalText
Microsoft.CodeAnalysis.AdditionalText.AdditionalText() -> void
Microsoft.CodeAnalysis.AnnotationExtensions
Microsoft.CodeAnalysis.AssemblyIdentity
Microsoft.CodeAnalysis.AssemblyIdentity.AssemblyIdentity(string name, System.Version version = null, string cultureName = null, System.Collections.Immutable.ImmutableArray<byte> publicKeyOrToken = default(System.Collections.Immutable.ImmutableArray<byte>), bool hasPublicKey = false, bool isRetargetable = false, System.Reflection.AssemblyContentType contentType = System.Reflection.AssemblyContentType.Default) -> void
......@@ -242,12 +243,16 @@ Microsoft.CodeAnalysis.CompilationReference.WithAliases(System.Collections.Immut
Microsoft.CodeAnalysis.CompilationReference.WithEmbedInteropTypes(bool value) -> Microsoft.CodeAnalysis.CompilationReference
Microsoft.CodeAnalysis.CompilationReference.WithProperties(Microsoft.CodeAnalysis.MetadataReferenceProperties properties) -> Microsoft.CodeAnalysis.CompilationReference
Microsoft.CodeAnalysis.ControlFlowAnalysis
Microsoft.CodeAnalysis.ControlFlowAnalysis.ControlFlowAnalysis() -> void
Microsoft.CodeAnalysis.CustomModifier
Microsoft.CodeAnalysis.CustomModifier.CustomModifier() -> void
Microsoft.CodeAnalysis.DataFlowAnalysis
Microsoft.CodeAnalysis.DataFlowAnalysis.DataFlowAnalysis() -> void
Microsoft.CodeAnalysis.DesktopAssemblyIdentityComparer
Microsoft.CodeAnalysis.DesktopStrongNameProvider
Microsoft.CodeAnalysis.DesktopStrongNameProvider.DesktopStrongNameProvider(System.Collections.Immutable.ImmutableArray<string> keyFileSearchPaths = default(System.Collections.Immutable.ImmutableArray<string>)) -> void
Microsoft.CodeAnalysis.Diagnostic
Microsoft.CodeAnalysis.Diagnostic.Diagnostic() -> void
Microsoft.CodeAnalysis.Diagnostic.GetSuppressionInfo(Microsoft.CodeAnalysis.Compilation compilation) -> Microsoft.CodeAnalysis.Diagnostics.SuppressionInfo
Microsoft.CodeAnalysis.Diagnostic.IsWarningAsError.get -> bool
Microsoft.CodeAnalysis.DiagnosticDescriptor
......@@ -265,12 +270,14 @@ Microsoft.CodeAnalysis.DiagnosticDescriptor.IsEnabledByDefault.get -> bool
Microsoft.CodeAnalysis.DiagnosticDescriptor.MessageFormat.get -> Microsoft.CodeAnalysis.LocalizableString
Microsoft.CodeAnalysis.DiagnosticDescriptor.Title.get -> Microsoft.CodeAnalysis.LocalizableString
Microsoft.CodeAnalysis.DiagnosticFormatter
Microsoft.CodeAnalysis.DiagnosticFormatter.DiagnosticFormatter() -> void
Microsoft.CodeAnalysis.DiagnosticSeverity
Microsoft.CodeAnalysis.DiagnosticSeverity.Error = 3 -> Microsoft.CodeAnalysis.DiagnosticSeverity
Microsoft.CodeAnalysis.DiagnosticSeverity.Hidden = 0 -> Microsoft.CodeAnalysis.DiagnosticSeverity
Microsoft.CodeAnalysis.DiagnosticSeverity.Info = 1 -> Microsoft.CodeAnalysis.DiagnosticSeverity
Microsoft.CodeAnalysis.DiagnosticSeverity.Warning = 2 -> Microsoft.CodeAnalysis.DiagnosticSeverity
Microsoft.CodeAnalysis.Diagnostics.AnalysisContext
Microsoft.CodeAnalysis.Diagnostics.AnalysisContext.AnalysisContext() -> void
Microsoft.CodeAnalysis.Diagnostics.AnalysisContext.RegisterSymbolAction(System.Action<Microsoft.CodeAnalysis.Diagnostics.SymbolAnalysisContext> action, params Microsoft.CodeAnalysis.SymbolKind[] symbolKinds) -> void
Microsoft.CodeAnalysis.Diagnostics.AnalysisContext.RegisterSyntaxNodeAction<TLanguageKindEnum>(System.Action<Microsoft.CodeAnalysis.Diagnostics.SyntaxNodeAnalysisContext> action, params TLanguageKindEnum[] syntaxKinds) -> void
Microsoft.CodeAnalysis.Diagnostics.AnalysisContext.TryGetValue<TValue>(Microsoft.CodeAnalysis.Text.SourceText text, Microsoft.CodeAnalysis.Diagnostics.SourceTextValueProvider<TValue> valueProvider, out TValue value) -> bool
......@@ -361,6 +368,7 @@ Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzersOptions.OnAnalyzerExc
Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzersOptions.Options.get -> Microsoft.CodeAnalysis.Diagnostics.AnalyzerOptions
Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzersOptions.ReportSuppressedDiagnostics.get -> bool
Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer
Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer.DiagnosticAnalyzer() -> void
Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzerAttribute
Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzerAttribute.DiagnosticAnalyzerAttribute(string firstLanguage, params string[] additionalLanguages) -> void
Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzerAttribute.Languages.get -> string[]
......@@ -723,6 +731,7 @@ Microsoft.CodeAnalysis.LocalizableResourceString.LocalizableResourceString(strin
Microsoft.CodeAnalysis.LocalizableResourceString.LocalizableResourceString(string nameOfLocalizableResource, System.Resources.ResourceManager resourceManager, System.Type resourceSource, params string[] formatArguments) -> void
Microsoft.CodeAnalysis.LocalizableString
Microsoft.CodeAnalysis.LocalizableString.Equals(Microsoft.CodeAnalysis.LocalizableString other) -> bool
Microsoft.CodeAnalysis.LocalizableString.LocalizableString() -> void
Microsoft.CodeAnalysis.LocalizableString.OnException -> System.EventHandler<System.Exception>
Microsoft.CodeAnalysis.LocalizableString.ToString(System.IFormatProvider formatProvider) -> string
Microsoft.CodeAnalysis.Location
......@@ -758,6 +767,7 @@ Microsoft.CodeAnalysis.MetadataReferenceProperties.WithAliases(System.Collection
Microsoft.CodeAnalysis.MetadataReferenceProperties.WithAliases(System.Collections.Immutable.ImmutableArray<string> aliases) -> Microsoft.CodeAnalysis.MetadataReferenceProperties
Microsoft.CodeAnalysis.MetadataReferenceProperties.WithEmbedInteropTypes(bool embedInteropTypes) -> Microsoft.CodeAnalysis.MetadataReferenceProperties
Microsoft.CodeAnalysis.MetadataReferenceResolver
Microsoft.CodeAnalysis.MetadataReferenceResolver.MetadataReferenceResolver() -> void
Microsoft.CodeAnalysis.MethodKind
Microsoft.CodeAnalysis.MethodKind.AnonymousFunction = 0 -> Microsoft.CodeAnalysis.MethodKind
Microsoft.CodeAnalysis.MethodKind.BuiltinOperator = 15 -> Microsoft.CodeAnalysis.MethodKind
......@@ -870,6 +880,7 @@ Microsoft.CodeAnalysis.SemanticModel.LookupNamespacesAndTypes(int position, Micr
Microsoft.CodeAnalysis.SemanticModel.LookupStaticMembers(int position, Microsoft.CodeAnalysis.INamespaceOrTypeSymbol container = null, string name = null) -> System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.ISymbol>
Microsoft.CodeAnalysis.SemanticModel.LookupSymbols(int position, Microsoft.CodeAnalysis.INamespaceOrTypeSymbol container = null, string name = null, bool includeReducedExtensionMethods = false) -> System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.ISymbol>
Microsoft.CodeAnalysis.SemanticModel.ParentModel.get -> Microsoft.CodeAnalysis.SemanticModel
Microsoft.CodeAnalysis.SemanticModel.SemanticModel() -> void
Microsoft.CodeAnalysis.SemanticModel.SyntaxTree.get -> Microsoft.CodeAnalysis.SyntaxTree
Microsoft.CodeAnalysis.SeparatedSyntaxList<TNode>
Microsoft.CodeAnalysis.SeparatedSyntaxList<TNode>.Add(TNode node) -> Microsoft.CodeAnalysis.SeparatedSyntaxList<TNode>
......@@ -1130,7 +1141,9 @@ Microsoft.CodeAnalysis.SymbolKind.Property = 15 -> Microsoft.CodeAnalysis.Symbol
Microsoft.CodeAnalysis.SymbolKind.RangeVariable = 16 -> Microsoft.CodeAnalysis.SymbolKind
Microsoft.CodeAnalysis.SymbolKind.TypeParameter = 17 -> Microsoft.CodeAnalysis.SymbolKind
Microsoft.CodeAnalysis.SymbolVisitor
Microsoft.CodeAnalysis.SymbolVisitor.SymbolVisitor() -> void
Microsoft.CodeAnalysis.SymbolVisitor<TResult>
Microsoft.CodeAnalysis.SymbolVisitor<TResult>.SymbolVisitor() -> void
Microsoft.CodeAnalysis.SyntaxAnnotation
Microsoft.CodeAnalysis.SyntaxAnnotation.Data.get -> string
Microsoft.CodeAnalysis.SyntaxAnnotation.Equals(Microsoft.CodeAnalysis.SyntaxAnnotation other) -> bool
......@@ -1303,6 +1316,7 @@ Microsoft.CodeAnalysis.SyntaxNodeOrTokenList.Span.get -> Microsoft.CodeAnalysis.
Microsoft.CodeAnalysis.SyntaxNodeOrTokenList.ToFullString() -> string
Microsoft.CodeAnalysis.SyntaxNodeOrTokenList.this[int index].get -> Microsoft.CodeAnalysis.SyntaxNodeOrToken
Microsoft.CodeAnalysis.SyntaxReference
Microsoft.CodeAnalysis.SyntaxReference.SyntaxReference() -> void
Microsoft.CodeAnalysis.SyntaxRemoveOptions
Microsoft.CodeAnalysis.SyntaxRemoveOptions.AddElasticMarker = 32 -> Microsoft.CodeAnalysis.SyntaxRemoveOptions
Microsoft.CodeAnalysis.SyntaxRemoveOptions.KeepDirectives = 8 -> Microsoft.CodeAnalysis.SyntaxRemoveOptions
......@@ -1397,6 +1411,7 @@ Microsoft.CodeAnalysis.SyntaxTree
Microsoft.CodeAnalysis.SyntaxTree.GetRoot(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> Microsoft.CodeAnalysis.SyntaxNode
Microsoft.CodeAnalysis.SyntaxTree.GetRootAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.SyntaxNode>
Microsoft.CodeAnalysis.SyntaxTree.Options.get -> Microsoft.CodeAnalysis.ParseOptions
Microsoft.CodeAnalysis.SyntaxTree.SyntaxTree() -> void
Microsoft.CodeAnalysis.SyntaxTree.TryGetRoot(out Microsoft.CodeAnalysis.SyntaxNode root) -> bool
Microsoft.CodeAnalysis.SyntaxTrivia
Microsoft.CodeAnalysis.SyntaxTrivia.ContainsDiagnostics.get -> bool
......@@ -1495,6 +1510,7 @@ Microsoft.CodeAnalysis.Text.SourceText.SourceText(System.Collections.Immutable.I
Microsoft.CodeAnalysis.Text.SourceText.WithChanges(params Microsoft.CodeAnalysis.Text.TextChange[] changes) -> Microsoft.CodeAnalysis.Text.SourceText
Microsoft.CodeAnalysis.Text.SourceText.Write(System.IO.TextWriter textWriter, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> void
Microsoft.CodeAnalysis.Text.SourceTextContainer
Microsoft.CodeAnalysis.Text.SourceTextContainer.SourceTextContainer() -> void
Microsoft.CodeAnalysis.Text.TextChange
Microsoft.CodeAnalysis.Text.TextChange.Equals(Microsoft.CodeAnalysis.Text.TextChange other) -> bool
Microsoft.CodeAnalysis.Text.TextChange.NewText.get -> string
......@@ -1528,6 +1544,7 @@ Microsoft.CodeAnalysis.Text.TextLineCollection.GetEnumerator() -> Microsoft.Code
Microsoft.CodeAnalysis.Text.TextLineCollection.GetLinePositionSpan(Microsoft.CodeAnalysis.Text.TextSpan span) -> Microsoft.CodeAnalysis.Text.LinePositionSpan
Microsoft.CodeAnalysis.Text.TextLineCollection.GetPosition(Microsoft.CodeAnalysis.Text.LinePosition position) -> int
Microsoft.CodeAnalysis.Text.TextLineCollection.GetTextSpan(Microsoft.CodeAnalysis.Text.LinePositionSpan span) -> Microsoft.CodeAnalysis.Text.TextSpan
Microsoft.CodeAnalysis.Text.TextLineCollection.TextLineCollection() -> void
Microsoft.CodeAnalysis.Text.TextSpan
Microsoft.CodeAnalysis.Text.TextSpan.CompareTo(Microsoft.CodeAnalysis.Text.TextSpan other) -> int
Microsoft.CodeAnalysis.Text.TextSpan.Contains(Microsoft.CodeAnalysis.Text.TextSpan span) -> bool
......
......@@ -538,8 +538,11 @@ Microsoft.CodeAnalysis.Semantics.LoopKind.None = 0 -> Microsoft.CodeAnalysis.Sem
Microsoft.CodeAnalysis.Semantics.LoopKind.WhileUntil = 1 -> Microsoft.CodeAnalysis.Semantics.LoopKind
Microsoft.CodeAnalysis.Semantics.OperationExtensions
Microsoft.CodeAnalysis.Semantics.OperationVisitor
Microsoft.CodeAnalysis.Semantics.OperationVisitor.OperationVisitor() -> void
Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>
Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.OperationVisitor() -> void
Microsoft.CodeAnalysis.Semantics.OperationWalker
Microsoft.CodeAnalysis.Semantics.OperationWalker.OperationWalker() -> void
Microsoft.CodeAnalysis.Semantics.SimpleBinaryOperationKind
Microsoft.CodeAnalysis.Semantics.SimpleBinaryOperationKind.Add = 1 -> Microsoft.CodeAnalysis.Semantics.SimpleBinaryOperationKind
Microsoft.CodeAnalysis.Semantics.SimpleBinaryOperationKind.And = 10 -> Microsoft.CodeAnalysis.Semantics.SimpleBinaryOperationKind
......
......@@ -12,7 +12,7 @@ public partial struct SeparatedSyntaxList<TNode>
// Public struct enumerator
// Only implements enumerator pattern as used by foreach
// Does not implement IEnumerator. Doing so would require the struct to implement IDisposable too.
[SuppressMessage("Performance", "RS0008", Justification = "Equality not actually implemented")]
[SuppressMessage("Performance", "CA1067", Justification = "Equality not actually implemented")]
public struct Enumerator
{
private readonly SeparatedSyntaxList<TNode> _list;
......
......@@ -9,7 +9,7 @@ namespace Microsoft.CodeAnalysis
{
public partial struct SyntaxList<TNode>
{
[SuppressMessage("Performance", "RS0008", Justification = "Equality not actually implemented")]
[SuppressMessage("Performance", "CA1067", Justification = "Equality not actually implemented")]
public struct Enumerator
{
private SyntaxList<TNode> _list;
......
......@@ -463,7 +463,7 @@ public override int GetHashCode()
/// <summary>
/// Enumerator for lists of SyntaxNodeOrToken structs.
/// </summary>
[SuppressMessage("Performance", "RS0008", Justification = "Equality not actually implemented")]
[SuppressMessage("Performance", "CA1067", Justification = "Equality not actually implemented")]
public struct Enumerator : IEnumerator<SyntaxNodeOrToken>
{
private SyntaxNodeOrTokenList _list;
......
......@@ -16,7 +16,7 @@ public partial struct SyntaxTokenList
/// <summary>
/// A structure for enumerating a <see cref="SyntaxTokenList"/>
/// </summary>
[SuppressMessage("Performance", "RS0008", Justification = "Equality not actually implemented")]
[SuppressMessage("Performance", "CA1067", Justification = "Equality not actually implemented")]
[StructLayout(LayoutKind.Auto)]
public struct Enumerator
{
......
......@@ -63,7 +63,7 @@ public override int GetHashCode()
return _list.GetHashCode();
}
[SuppressMessage("Performance", "RS0008", Justification = "Equality not actually implemented")]
[SuppressMessage("Performance", "CA1067", Justification = "Equality not actually implemented")]
[StructLayout(LayoutKind.Auto)]
public struct Enumerator
{
......
......@@ -86,7 +86,7 @@ IEnumerator IEnumerable.GetEnumerator()
return this.GetEnumerator();
}
[SuppressMessage("Performance", "RS0008", Justification = "Equality not actually implemented")]
[SuppressMessage("Performance", "CA1067", Justification = "Equality not actually implemented")]
public struct Enumerator : IEnumerator<TextLine>, IEnumerator
{
private readonly TextLineCollection _lines;
......
......@@ -239,9 +239,9 @@ protected override int RunLocalCompilation(string[] arguments, BuildPaths buildP
CancellationToken cancellationToken)
{
// Ignore this warning because the desktop projects don't target 4.6 yet
#pragma warning disable RS0007 // Avoid zero-length array allocations.
#pragma warning disable CA1825 // Avoid zero-length array allocations.
var buffer = new byte[0];
#pragma warning restore RS0007 // Avoid zero-length array allocations.
#pragma warning restore CA1825 // Avoid zero-length array allocations.
while (!cancellationToken.IsCancellationRequested && pipeStream.IsConnected)
{
......
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Diagnostic rules for the BasicCodeAnalysis (Portable and Desktop) projects" Description="Enables rules specific to these projects." ToolsVersion="14.0">
<!-- Include default rules -->
<Include Path="..\..\..\build\Rulesets\Roslyn.ruleset" Action="Default" />
<Include Path="..\..\..\build\Rulesets\Roslyn_BuildRules.ruleset" Action="Default" />
<Rules AnalyzerId="Roslyn.Diagnostics.Analyzers.VisualBasic" RuleNamespace="Roslyn.Diagnostics.Analyzers.VisualBasic">
<Rule Id="RS0004" Action="Error" />
</Rules>
......
......@@ -73,7 +73,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Me._succeeded = Not Me._context.Failed
Dim result = If(Me._context.Failed, ImmutableArray(Of ISymbol).Empty,
Sort(DataFlowsInWalker.Analyze(_context.AnalysisInfo, _context.RegionInfo, UnassignedVariables, _succeeded, _invalidRegionDetected)))
ImmutableInterlocked.InterlockedCompareExchange(_dataFlowsIn, result.ToImmutableArray(), Nothing)
ImmutableInterlocked.InterlockedCompareExchange(_dataFlowsIn, result, Nothing)
End If
Return _dataFlowsIn
End Get
......
......@@ -1930,6 +1930,7 @@ Microsoft.CodeAnalysis.VisualBasic.Syntax.SyncLockStatementSyntax.Update(syncLoc
Microsoft.CodeAnalysis.VisualBasic.Syntax.SyncLockStatementSyntax.WithExpression(expression As Microsoft.CodeAnalysis.VisualBasic.Syntax.ExpressionSyntax) -> Microsoft.CodeAnalysis.VisualBasic.Syntax.SyncLockStatementSyntax
Microsoft.CodeAnalysis.VisualBasic.Syntax.SyncLockStatementSyntax.WithSyncLockKeyword(syncLockKeyword As Microsoft.CodeAnalysis.SyntaxToken) -> Microsoft.CodeAnalysis.VisualBasic.Syntax.SyncLockStatementSyntax
Microsoft.CodeAnalysis.VisualBasic.Syntax.SyntaxNodeRemover
Microsoft.CodeAnalysis.VisualBasic.Syntax.SyntaxNodeRemover.New() -> Void
Microsoft.CodeAnalysis.VisualBasic.Syntax.TernaryConditionalExpressionSyntax
Microsoft.CodeAnalysis.VisualBasic.Syntax.TernaryConditionalExpressionSyntax.CloseParenToken() -> Microsoft.CodeAnalysis.SyntaxToken
Microsoft.CodeAnalysis.VisualBasic.Syntax.TernaryConditionalExpressionSyntax.Condition() -> Microsoft.CodeAnalysis.VisualBasic.Syntax.ExpressionSyntax
......@@ -2397,7 +2398,9 @@ Microsoft.CodeAnalysis.VisualBasic.SyntaxExtensions.Type(asClauseSyntax As Micro
Microsoft.CodeAnalysis.VisualBasic.SyntaxExtensions.Type(newExpressionSyntax As Microsoft.CodeAnalysis.VisualBasic.Syntax.NewExpressionSyntax) -> Microsoft.CodeAnalysis.VisualBasic.Syntax.TypeSyntax
Microsoft.CodeAnalysis.VisualBasic.SyntaxExtensions.WithIdentifier(simpleName As Microsoft.CodeAnalysis.VisualBasic.Syntax.SimpleNameSyntax, identifier As Microsoft.CodeAnalysis.SyntaxToken) -> Microsoft.CodeAnalysis.VisualBasic.Syntax.SimpleNameSyntax
Microsoft.CodeAnalysis.VisualBasic.SyntaxFactory
Microsoft.CodeAnalysis.VisualBasic.SyntaxFactory.New() -> Void
Microsoft.CodeAnalysis.VisualBasic.SyntaxFacts
Microsoft.CodeAnalysis.VisualBasic.SyntaxFacts.New() -> Void
Microsoft.CodeAnalysis.VisualBasic.SyntaxKind
Microsoft.CodeAnalysis.VisualBasic.SyntaxKind.AddAssignmentStatement = 249 -> Microsoft.CodeAnalysis.VisualBasic.SyntaxKind
Microsoft.CodeAnalysis.VisualBasic.SyntaxKind.AddExpression = 307 -> Microsoft.CodeAnalysis.VisualBasic.SyntaxKind
......@@ -3264,8 +3267,11 @@ Microsoft.CodeAnalysis.VisualBasic.VisualBasicSyntaxRewriter.New(visitIntoStruct
Microsoft.CodeAnalysis.VisualBasic.VisualBasicSyntaxTree
Microsoft.CodeAnalysis.VisualBasic.VisualBasicSyntaxTree.CloneNodeAsRoot(Of T)(node As T) -> T
Microsoft.CodeAnalysis.VisualBasic.VisualBasicSyntaxTree.GetCompilationUnitRoot(cancellationToken As System.Threading.CancellationToken = Nothing) -> Microsoft.CodeAnalysis.VisualBasic.Syntax.CompilationUnitSyntax
Microsoft.CodeAnalysis.VisualBasic.VisualBasicSyntaxTree.New() -> Void
Microsoft.CodeAnalysis.VisualBasic.VisualBasicSyntaxVisitor
Microsoft.CodeAnalysis.VisualBasic.VisualBasicSyntaxVisitor.New() -> Void
Microsoft.CodeAnalysis.VisualBasic.VisualBasicSyntaxVisitor(Of TResult)
Microsoft.CodeAnalysis.VisualBasic.VisualBasicSyntaxVisitor(Of TResult).New() -> Void
Microsoft.CodeAnalysis.VisualBasic.VisualBasicSyntaxWalker
Microsoft.CodeAnalysis.VisualBasic.VisualBasicSyntaxWalker.New(depth As Microsoft.CodeAnalysis.SyntaxWalkerDepth = Microsoft.CodeAnalysis.SyntaxWalkerDepth.Node) -> Void
Microsoft.CodeAnalysis.VisualBasicExtensions
......@@ -16,8 +16,6 @@ Imports Microsoft.VisualStudio.Text
Imports Microsoft.VisualStudio.Text.Editor
Imports Moq
#Disable Warning RS0007 ' Avoid zero-length array allocations. This is non-shipping test code.
Namespace Microsoft.CodeAnalysis.Editor.UnitTests.IntelliSense
Public Class SignatureHelpControllerTests
......
......@@ -9,8 +9,6 @@ Imports Roslyn.Test.Utilities
Imports Roslyn.Utilities
Imports System.Threading.Tasks
#Disable Warning RS0007 ' Avoid zero-length array allocations. This is non-shipping test code.
Namespace Microsoft.CodeAnalysis.Editor.UnitTests.NavigationBar
Partial Public Class CSharpNavigationBarTests
<Fact, Trait(Traits.Feature, Traits.Features.NavigationBar), WorkItem(545021, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/545021")>
......
......@@ -3,8 +3,6 @@
Imports System.Threading.Tasks
Imports Microsoft.CodeAnalysis.Editor.VisualBasic
#Disable Warning RS0007 ' Avoid zero-length array allocations. This is non-shipping test code.
Namespace Microsoft.CodeAnalysis.Editor.UnitTests.NavigationBar
Partial Public Class VisualBasicNavigationBarTests
<Fact, Trait(Traits.Feature, Traits.Features.NavigationBar), WorkItem(545000, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/545000")>
......
......@@ -5,8 +5,6 @@ Imports Microsoft.CodeAnalysis.Differencing
Imports Microsoft.CodeAnalysis.EditAndContinue
Imports Microsoft.CodeAnalysis.Emit
#Disable Warning RS0007 ' Avoid zero-length array allocations. This is non-shipping test code.
Namespace Microsoft.CodeAnalysis.VisualBasic.EditAndContinue.UnitTests
Public Class LineEditTests
Inherits RudeEditTestBase
......
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#Disable Warning RS0007 ' Avoid zero-length array allocations. This is non-shipping test code.
Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.UnitTests.Recommendations.Declarations
Public Class ParameterModifiersKeywordRecommenderTests
......
......@@ -19,7 +19,7 @@ namespace Microsoft.CodeAnalysis.EditAndContinue
{
internal sealed class EditSession
{
[SuppressMessage("Performance", "RS0008", Justification = "Equality not actually implemented")]
[SuppressMessage("Performance", "CA1067", Justification = "Equality not actually implemented")]
private struct Analysis
{
public readonly Document Document;
......
......@@ -79,6 +79,7 @@ Microsoft.CodeAnalysis.Completion.CompletionRules.WithDefaultEnterKeyRule(Micros
Microsoft.CodeAnalysis.Completion.CompletionRules.WithDismissIfEmpty(bool dismissIfEmpty) -> Microsoft.CodeAnalysis.Completion.CompletionRules
Microsoft.CodeAnalysis.Completion.CompletionRules.WithDismissIfLastCharacterDeleted(bool dismissIfLastCharacterDeleted) -> Microsoft.CodeAnalysis.Completion.CompletionRules
Microsoft.CodeAnalysis.Completion.CompletionService
Microsoft.CodeAnalysis.Completion.CompletionService.CompletionService() -> void
Microsoft.CodeAnalysis.Completion.CompletionServiceWithProviders
Microsoft.CodeAnalysis.Completion.CompletionServiceWithProviders.CompletionServiceWithProviders(Microsoft.CodeAnalysis.Workspace workspace) -> void
Microsoft.CodeAnalysis.Completion.CompletionServiceWithProviders.GetProvider(Microsoft.CodeAnalysis.Completion.CompletionItem item) -> Microsoft.CodeAnalysis.Completion.CompletionProvider
......
......@@ -125,9 +125,13 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.CodeFixes.Suppression
Dim attributeList = CreateAttributeList(targetSymbol, diagnostic)
Dim attributeStatement = SyntaxFactory.AttributesStatement(New SyntaxList(Of AttributeListSyntax)().Add(attributeList))
If Not isFirst AndAlso Not IsEndOfLine(compilationRoot.Attributes.Last().GetTrailingTrivia().LastOrDefault) Then
' Add leading end of line trivia to attribute statement
attributeStatement = attributeStatement.WithLeadingTrivia(attributeStatement.GetLeadingTrivia.Add(SyntaxFactory.ElasticCarriageReturnLineFeed))
If Not isFirst Then
Dim trailingTrivia = compilationRoot.Attributes.Last().GetTrailingTrivia()
Dim lastTrivia = If(trailingTrivia.IsEmpty, Nothing, trailingTrivia(trailingTrivia.Count - 1))
If Not IsEndOfLine(lastTrivia) Then
' Add leading end of line trivia to attribute statement
attributeStatement = attributeStatement.WithLeadingTrivia(attributeStatement.GetLeadingTrivia.Add(SyntaxFactory.ElasticCarriageReturnLineFeed))
End If
End If
attributeStatement = CType(Await Formatter.FormatAsync(attributeStatement, workspace, cancellationToken:=cancellationToken).ConfigureAwait(False), AttributesStatementSyntax)
......
......@@ -8,6 +8,7 @@ Microsoft.VisualStudio.InteractiveWindow.Shell.IVsInteractiveWindowFactory.Creat
Microsoft.VisualStudio.InteractiveWindow.Shell.IVsInteractiveWindowOleCommandTargetProvider
Microsoft.VisualStudio.InteractiveWindow.Shell.IVsInteractiveWindowOleCommandTargetProvider.GetCommandTarget(Microsoft.VisualStudio.Text.Editor.IWpfTextView textView, Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget nextTarget) -> Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget
Microsoft.VisualStudio.InteractiveWindow.Shell.InteractiveWindowPackage
Microsoft.VisualStudio.InteractiveWindow.Shell.InteractiveWindowPackage.InteractiveWindowPackage() -> void
Microsoft.VisualStudio.InteractiveWindow.Shell.ProvideInteractiveWindowAttribute
Microsoft.VisualStudio.InteractiveWindow.Shell.ProvideInteractiveWindowAttribute.DockedHeight.get -> int
Microsoft.VisualStudio.InteractiveWindow.Shell.ProvideInteractiveWindowAttribute.DockedHeight.set -> void
......
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Common diagnostic rules for all VSInteractive window project" Description="Enables/disable rules specific to all non-shipping projects." ToolsVersion="14.0">
<Include Path="..\..\..\build\Rulesets\Roslyn_BuildRules.ruleset" Action="Default" />
<Include Path="MinimumRecommendedRules.ruleset" Action="Default" />
</RuleSet>
\ No newline at end of file
......@@ -37,11 +37,11 @@
</ProjectReference>
</ItemGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet>VSInteractiveWindowRules.ruleset</CodeAnalysisRuleSet>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet>VSInteractiveWindowRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="envdte, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
......@@ -117,4 +117,4 @@
<ImportGroup Label="Targets">
<Import Project="..\..\..\build\Targets\VSL.Imports.targets" />
</ImportGroup>
</Project>
\ No newline at end of file
</Project>
......@@ -54,11 +54,9 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<OptionInfer>On</OptionInfer>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OptionInfer>On</OptionInfer>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
......
......@@ -299,8 +299,10 @@ Public Class TransformVisitor
node = DirectCast(MyBase.VisitSingleLineIfStatement(node), SingleLineIfStatementSyntax)
Dim elseClause = node.ElseClause
If transformKind = transformKind.SingleLineIfToMultiLineIf Then
Dim leadingTriviaList = SyntaxFactory.TriviaList(node.GetLeadingTrivia().LastOrDefault(), SyntaxFactory.WhitespaceTrivia(" "))
If transformKind = TransformKind.SingleLineIfToMultiLineIf Then
Dim triviaList = node.GetLeadingTrivia()
Dim lastTrivia = If(triviaList.Count = 0, Nothing, triviaList(triviaList.Count - 1))
Dim leadingTriviaList = SyntaxFactory.TriviaList(lastTrivia, SyntaxFactory.WhitespaceTrivia(" "))
Dim newIfStatement = SyntaxFactory.IfStatement(node.IfKeyword, node.Condition, node.ThenKeyword)
Dim newIfStatements = GetSequentialListOfStatements(node.Statements, leadingTriviaList)
......
......@@ -20,8 +20,6 @@
using TestBase = PortableTestUtils::Roslyn.Test.Utilities.TestBase;
using AssertEx = PortableTestUtils::Roslyn.Test.Utilities.AssertEx;
#pragma warning disable RS0003 // Do not directly await a Task
namespace Microsoft.CodeAnalysis.CSharp.Scripting.Test
{
using static TestCompilationFactory;
......
......@@ -19,8 +19,6 @@
using Roslyn.Test.Utilities;
using Xunit;
#pragma warning disable RS0003 // Do not directly await a Task
namespace Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests
{
using static TestCompilationFactory;
......
......@@ -10,8 +10,6 @@
using Roslyn.Utilities;
using Xunit;
#pragma warning disable RS0003 // Do not directly await a Task
namespace Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests
{
public class ScriptTests : TestBase
......
......@@ -39,6 +39,7 @@ Microsoft.CodeAnalysis.Scripting.Hosting.MetadataShadowCopyProvider.NeedsShadowC
Microsoft.CodeAnalysis.Scripting.Hosting.MetadataShadowCopyProvider.SuppressShadowCopy(string originalPath) -> void
Microsoft.CodeAnalysis.Scripting.Hosting.ObjectFormatter
Microsoft.CodeAnalysis.Scripting.Hosting.ObjectFormatter.FormatObject(object obj) -> string
Microsoft.CodeAnalysis.Scripting.Hosting.ObjectFormatter.ObjectFormatter() -> void
Microsoft.CodeAnalysis.Scripting.Hosting.PrintOptions
Microsoft.CodeAnalysis.Scripting.Hosting.PrintOptions.Ellipsis.get -> string
Microsoft.CodeAnalysis.Scripting.Hosting.PrintOptions.Ellipsis.set -> void
......@@ -50,6 +51,7 @@ Microsoft.CodeAnalysis.Scripting.Hosting.PrintOptions.MemberDisplayFormat.get ->
Microsoft.CodeAnalysis.Scripting.Hosting.PrintOptions.MemberDisplayFormat.set -> void
Microsoft.CodeAnalysis.Scripting.Hosting.PrintOptions.NumberRadix.get -> int
Microsoft.CodeAnalysis.Scripting.Hosting.PrintOptions.NumberRadix.set -> void
Microsoft.CodeAnalysis.Scripting.Hosting.PrintOptions.PrintOptions() -> void
Microsoft.CodeAnalysis.Scripting.Script
Microsoft.CodeAnalysis.Scripting.Script.Code.get -> string
Microsoft.CodeAnalysis.Scripting.Script.Compile(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic>
......
Microsoft.CodeAnalysis.VisualBasic.Scripting.Hosting.VisualBasicObjectFormatter
Microsoft.CodeAnalysis.VisualBasic.Scripting.VisualBasicScript
Overrides Microsoft.CodeAnalysis.VisualBasic.Scripting.Hosting.VisualBasicObjectFormatter.FormatObject(obj As Object, options As Microsoft.CodeAnalysis.Scripting.Hosting.PrintOptions) -> String
Overrides Microsoft.CodeAnalysis.VisualBasic.Scripting.Hosting.VisualBasicObjectFormatter.FormatException(e As System.Exception) -> String
Overrides Microsoft.CodeAnalysis.VisualBasic.Scripting.Hosting.VisualBasicObjectFormatter.FormatObject(obj As Object, options As Microsoft.CodeAnalysis.Scripting.Hosting.PrintOptions) -> String
Shared Microsoft.CodeAnalysis.VisualBasic.Scripting.VisualBasicScript.Create(Of T)(code As String, options As Microsoft.CodeAnalysis.Scripting.ScriptOptions = Nothing, globalsType As System.Type = Nothing, assemblyLoader As Microsoft.CodeAnalysis.Scripting.Hosting.InteractiveAssemblyLoader = Nothing) -> Microsoft.CodeAnalysis.Scripting.Script(Of T)
Shared Microsoft.CodeAnalysis.VisualBasic.Scripting.VisualBasicScript.Create(code As String, options As Microsoft.CodeAnalysis.Scripting.ScriptOptions = Nothing, globalsType As System.Type = Nothing, assemblyLoader As Microsoft.CodeAnalysis.Scripting.Hosting.InteractiveAssemblyLoader = Nothing) -> Microsoft.CodeAnalysis.Scripting.Script(Of Object)
Shared Microsoft.CodeAnalysis.VisualBasic.Scripting.VisualBasicScript.EvaluateAsync(Of T)(code As String, options As Microsoft.CodeAnalysis.Scripting.ScriptOptions = Nothing, globals As Object = Nothing, cancellationToken As System.Threading.CancellationToken = Nothing) -> System.Threading.Tasks.Task(Of T)
......
......@@ -7,8 +7,6 @@ Imports Microsoft.CodeAnalysis.VisualBasic
Imports Roslyn.Test.Utilities
Imports Xunit
#Disable Warning RS0003 ' Do not directly await a Task
Namespace Microsoft.CodeAnalysis.VisualBasic.Scripting.UnitTests
Public Class InteractiveSessionTests
......
......@@ -5,8 +5,6 @@ Imports Microsoft.CodeAnalysis.Scripting
Imports Roslyn.Test.Utilities
Imports Xunit
#Disable Warning RS0003 ' Do not directly await a Task
Namespace Microsoft.CodeAnalysis.VisualBasic.Scripting.UnitTests
Public Class ScriptTests
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Roslyn.Test.Performance.Utilities
namespace Roslyn.Test.Performance.Utilities
{
public interface ILogger
internal interface ILogger
{
void Log(string v);
void Flush();
......
using System;
using System.Diagnostics;
using System.IO;
namespace Roslyn.Test.Performance.Utilities
namespace Roslyn.Test.Performance.Utilities
{
public interface ITraceManager
internal interface ITraceManager
{
bool HasWarmUpIteration { get; }
......
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Roslyn.Test.Performance.Utilities
{
public class ConsoleAndFileLogger : ILogger
internal class ConsoleAndFileLogger : ILogger
{
private readonly string _file;
private readonly StringBuilder _buffer = new StringBuilder();
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Roslyn.Test.Performance.Utilities
namespace Roslyn.Test.Performance.Utilities
{
public class NoOpTraceManager : ITraceManager
internal class NoOpTraceManager : ITraceManager
{
public NoOpTraceManager()
{
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.CompilerServices;
namespace Roslyn.Test.Performance.Utilities
{
public abstract class PerfTest : RelativeDirectory
internal abstract class PerfTest : RelativeDirectory
{
public PerfTest([CallerFilePath] string workingFile = "") : base(workingFile) { }
......
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Net;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace Roslyn.Test.Performance.Utilities
{
public class RelativeDirectory
internal class RelativeDirectory
{
string _workingDir;
......
......@@ -3,7 +3,7 @@
namespace Roslyn.Test.Performance.Utilities
{
public class ScenarioGenerator
internal class ScenarioGenerator
{
private const string KernelProviderGuid = @"{9e814aad-3204-11d2-9a82-006008a86939}";
private string _fullPath = "scenarios.xml";
......
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Net;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Roslyn.Test.Performance.Utilities;
namespace Roslyn.Test.Performance.Utilities
{
public class TestUtilities
internal class TestUtilities
{
//
// Directory Locating Functions
......@@ -23,10 +17,10 @@ public class TestUtilities
/// <summary>
/// This method should be called *ONLY* by the csx scripts.
/// This method *MUST NOT* be called from within the library itself. If this method is called within the library instead of csx scripts
/// then <param name="sourceFilePath"/> will be set to the path of the file when the library is actual built.
/// then <paramref name="sourceFilePath"/> will be set to the path of the file when the library is actual built.
/// For Eg: If SomeLibarayFile.cs calls this method and if the library is built is some build machine where SomeLibarayFile.cs is saved at
/// Y:/Project/SomeLibarayFile.cs then when the library is used in any machine where there is no Y: drive then we will see errors saying
/// invalid directory path. Also note that <param name="sourceFilePath"/> will be set to "Y:/Project/SomeLibarayFile.cs" and not set to
/// invalid directory path. Also note that <paramref name="sourceFilePath"/> will be set to "Y:/Project/SomeLibarayFile.cs" and not set to
/// the path of the file from where the call to SomeLibarayFile.cs which in turn called <see cref="InitUtilitiesFromCsx(string)"/>
/// </summary>
public static void InitUtilitiesFromCsx([CallerFilePath] string sourceFilePath = "")
......@@ -70,9 +64,9 @@ public class ProcessResult
public bool Succeeded => !Failed;
}
/// Shells out, and if the process fails, log the error
// Shells out, and if the process fails, log the error
/// and quit the script.
/// NOTE: <param name="workingDirectory"/> should be set when called inside the library and not from csx. see <see cref="InitUtilitiesFromCsx(string)"/>
/// NOTE: <paramref name="workingDirectory"/> should be set when called inside the library and not from csx. see <see cref="InitUtilitiesFromCsx(string)"/>
/// for more information
public static void ShellOutVital(
string file,
......@@ -90,7 +84,7 @@ public class ProcessResult
}
}
/// NOTE: <param name="workingDirectory"/> should be set when called inside the library and not from csx. see <see cref="InitUtilitiesFromCsx(string)"/>
/// NOTE: <paramref name="workingDirectory"/> should be set when called inside the library and not from csx. see <see cref="InitUtilitiesFromCsx(string)"/>
/// for more information
public static ProcessResult ShellOut(
string file,
......
......@@ -7,10 +7,10 @@
namespace Roslyn.Test.Performance.Utilities
{
public class Tools
internal class Tools
{
/// Takes a consumptionTempResults file and converts to csv file
/// Each info contains the <ScenarioName, Metric Key, Metric value>
/// Each info contains the {ScenarioName, Metric Key, Metric value}
public static bool ConvertConsumptionToCsv(string source, string destination, string requiredMetricKey, ILogger logger)
{
logger.Log("Entering ConvertConsumptionToCsv");
......
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using static Roslyn.Test.Performance.Utilities.TestUtilities;
namespace Roslyn.Test.Performance.Utilities
{
public class TraceManager : ITraceManager
internal class TraceManager : ITraceManager
{
private readonly ScenarioGenerator _scenarioGenerator;
private readonly string _cpcPath;
......
......@@ -2,7 +2,7 @@
namespace Roslyn.Test.Performance.Utilities
{
public class TraceManagerFactory
internal class TraceManagerFactory
{
public static ITraceManager GetTraceManager(bool isVerbose = false)
{
......
......@@ -131,12 +131,7 @@
<Compile Include="Perf\util\TraceManager.cs" />
<Compile Include="Perf\util\TraceManagerFactory.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<ImportGroup Label="Targets">
<Import Project="..\..\build\Targets\VSL.Imports.targets" />
</ImportGroup>
</Project>
\ No newline at end of file
XamlGeneratedNamespace.GeneratedInternalTypeHelper
\ No newline at end of file
XamlGeneratedNamespace.GeneratedInternalTypeHelper
XamlGeneratedNamespace.GeneratedInternalTypeHelper.GeneratedInternalTypeHelper() -> void
\ No newline at end of file
......@@ -22,12 +22,6 @@
<UseCodebase>true</UseCodebase>
<CopyNuGetImplementations>true</CopyNuGetImplementations>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<None Include="project.json" />
<None Include="source.extension.vsixmanifest">
......
......@@ -162,11 +162,9 @@
<NuGetPackageToIncludeInVsix Include="System.IO.FileSystem.Primitives" />
</ItemGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<ItemGroup>
......
......@@ -56,12 +56,6 @@
<Name>ServicesTest</Name>
</ProjectReference>
</ItemGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<CodeAnalysisRuleSet>..\..\..\build\TestProjectRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<CodeAnalysisRuleSet>..\..\..\build\TestProjectRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
......
......@@ -37,18 +37,22 @@ Microsoft.CodeAnalysis.CodeActions.ApplyChangesOperation
Microsoft.CodeAnalysis.CodeActions.ApplyChangesOperation.ApplyChangesOperation(Microsoft.CodeAnalysis.Solution changedSolution) -> void
Microsoft.CodeAnalysis.CodeActions.ApplyChangesOperation.ChangedSolution.get -> Microsoft.CodeAnalysis.Solution
Microsoft.CodeAnalysis.CodeActions.CodeAction
Microsoft.CodeAnalysis.CodeActions.CodeAction.CodeAction() -> void
Microsoft.CodeAnalysis.CodeActions.CodeAction.GetOperationsAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task<System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.CodeActions.CodeActionOperation>>
Microsoft.CodeAnalysis.CodeActions.CodeAction.GetPreviewOperationsAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task<System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.CodeActions.CodeActionOperation>>
Microsoft.CodeAnalysis.CodeActions.CodeAction.PostProcessAsync(System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.CodeActions.CodeActionOperation> operations, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task<System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.CodeActions.CodeActionOperation>>
Microsoft.CodeAnalysis.CodeActions.CodeAction.PostProcessChangesAsync(Microsoft.CodeAnalysis.Solution changedSolution, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Solution>
Microsoft.CodeAnalysis.CodeActions.CodeActionOperation
Microsoft.CodeAnalysis.CodeActions.CodeActionOperation.CodeActionOperation() -> void
Microsoft.CodeAnalysis.CodeActions.CodeActionWithOptions
Microsoft.CodeAnalysis.CodeActions.CodeActionWithOptions.CodeActionWithOptions() -> void
Microsoft.CodeAnalysis.CodeActions.CodeActionWithOptions.GetOperationsAsync(object options, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.CodeActions.CodeActionOperation>>
Microsoft.CodeAnalysis.CodeActions.ConflictAnnotation
Microsoft.CodeAnalysis.CodeActions.OpenDocumentOperation
Microsoft.CodeAnalysis.CodeActions.OpenDocumentOperation.DocumentId.get -> Microsoft.CodeAnalysis.DocumentId
Microsoft.CodeAnalysis.CodeActions.OpenDocumentOperation.OpenDocumentOperation(Microsoft.CodeAnalysis.DocumentId documentId, bool activateIfAlreadyOpen = false) -> void
Microsoft.CodeAnalysis.CodeActions.PreviewOperation
Microsoft.CodeAnalysis.CodeActions.PreviewOperation.PreviewOperation() -> void
Microsoft.CodeAnalysis.CodeActions.RenameAnnotation
Microsoft.CodeAnalysis.CodeActions.WarningAnnotation
Microsoft.CodeAnalysis.CodeFixes.CodeFixContext
......@@ -62,6 +66,7 @@ Microsoft.CodeAnalysis.CodeFixes.CodeFixContext.RegisterCodeFix(Microsoft.CodeAn
Microsoft.CodeAnalysis.CodeFixes.CodeFixContext.RegisterCodeFix(Microsoft.CodeAnalysis.CodeActions.CodeAction action, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic> diagnostics) -> void
Microsoft.CodeAnalysis.CodeFixes.CodeFixContext.Span.get -> Microsoft.CodeAnalysis.Text.TextSpan
Microsoft.CodeAnalysis.CodeFixes.CodeFixProvider
Microsoft.CodeAnalysis.CodeFixes.CodeFixProvider.CodeFixProvider() -> void
Microsoft.CodeAnalysis.CodeFixes.ExportCodeFixProviderAttribute
Microsoft.CodeAnalysis.CodeFixes.ExportCodeFixProviderAttribute.ExportCodeFixProviderAttribute(string firstLanguage, params string[] additionalLanguages) -> void
Microsoft.CodeAnalysis.CodeFixes.ExportCodeFixProviderAttribute.Languages.get -> string[]
......@@ -73,6 +78,7 @@ Microsoft.CodeAnalysis.CodeFixes.FixAllContext.CodeActionEquivalenceKey.get -> s
Microsoft.CodeAnalysis.CodeFixes.FixAllContext.CodeFixProvider.get -> Microsoft.CodeAnalysis.CodeFixes.CodeFixProvider
Microsoft.CodeAnalysis.CodeFixes.FixAllContext.DiagnosticIds.get -> System.Collections.Immutable.ImmutableHashSet<string>
Microsoft.CodeAnalysis.CodeFixes.FixAllContext.DiagnosticProvider
Microsoft.CodeAnalysis.CodeFixes.FixAllContext.DiagnosticProvider.DiagnosticProvider() -> void
Microsoft.CodeAnalysis.CodeFixes.FixAllContext.Document.get -> Microsoft.CodeAnalysis.Document
Microsoft.CodeAnalysis.CodeFixes.FixAllContext.FixAllContext(Microsoft.CodeAnalysis.Document document, Microsoft.CodeAnalysis.CodeFixes.CodeFixProvider codeFixProvider, Microsoft.CodeAnalysis.CodeFixes.FixAllScope scope, string codeActionEquivalenceKey, System.Collections.Generic.IEnumerable<string> diagnosticIds, Microsoft.CodeAnalysis.CodeFixes.FixAllContext.DiagnosticProvider fixAllDiagnosticProvider, System.Threading.CancellationToken cancellationToken) -> void
Microsoft.CodeAnalysis.CodeFixes.FixAllContext.FixAllContext(Microsoft.CodeAnalysis.Project project, Microsoft.CodeAnalysis.CodeFixes.CodeFixProvider codeFixProvider, Microsoft.CodeAnalysis.CodeFixes.FixAllScope scope, string codeActionEquivalenceKey, System.Collections.Generic.IEnumerable<string> diagnosticIds, Microsoft.CodeAnalysis.CodeFixes.FixAllContext.DiagnosticProvider fixAllDiagnosticProvider, System.Threading.CancellationToken cancellationToken) -> void
......@@ -84,6 +90,7 @@ Microsoft.CodeAnalysis.CodeFixes.FixAllContext.Scope.get -> Microsoft.CodeAnalys
Microsoft.CodeAnalysis.CodeFixes.FixAllContext.Solution.get -> Microsoft.CodeAnalysis.Solution
Microsoft.CodeAnalysis.CodeFixes.FixAllContext.WithCancellationToken(System.Threading.CancellationToken cancellationToken) -> Microsoft.CodeAnalysis.CodeFixes.FixAllContext
Microsoft.CodeAnalysis.CodeFixes.FixAllProvider
Microsoft.CodeAnalysis.CodeFixes.FixAllProvider.FixAllProvider() -> void
Microsoft.CodeAnalysis.CodeFixes.FixAllScope
Microsoft.CodeAnalysis.CodeFixes.FixAllScope.Custom = 3 -> Microsoft.CodeAnalysis.CodeFixes.FixAllScope
Microsoft.CodeAnalysis.CodeFixes.FixAllScope.Document = 0 -> Microsoft.CodeAnalysis.CodeFixes.FixAllScope
......@@ -97,6 +104,7 @@ Microsoft.CodeAnalysis.CodeRefactorings.CodeRefactoringContext.Document.get -> M
Microsoft.CodeAnalysis.CodeRefactorings.CodeRefactoringContext.RegisterRefactoring(Microsoft.CodeAnalysis.CodeActions.CodeAction action) -> void
Microsoft.CodeAnalysis.CodeRefactorings.CodeRefactoringContext.Span.get -> Microsoft.CodeAnalysis.Text.TextSpan
Microsoft.CodeAnalysis.CodeRefactorings.CodeRefactoringProvider
Microsoft.CodeAnalysis.CodeRefactorings.CodeRefactoringProvider.CodeRefactoringProvider() -> void
Microsoft.CodeAnalysis.CodeRefactorings.ExportCodeRefactoringProviderAttribute
Microsoft.CodeAnalysis.CodeRefactorings.ExportCodeRefactoringProviderAttribute.ExportCodeRefactoringProviderAttribute(string firstLanguage, params string[] additionalLanguages) -> void
Microsoft.CodeAnalysis.CodeRefactorings.ExportCodeRefactoringProviderAttribute.Languages.get -> string[]
......@@ -372,6 +380,7 @@ Microsoft.CodeAnalysis.Editing.SyntaxGenerator.RemoveAllAttributes(Microsoft.Cod
Microsoft.CodeAnalysis.Editing.SyntaxGenerator.RemoveNodes(Microsoft.CodeAnalysis.SyntaxNode root, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.SyntaxNode> declarations) -> Microsoft.CodeAnalysis.SyntaxNode
Microsoft.CodeAnalysis.Editing.SyntaxGenerator.SwitchSection(Microsoft.CodeAnalysis.SyntaxNode caseExpression, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.SyntaxNode> statements) -> Microsoft.CodeAnalysis.SyntaxNode
Microsoft.CodeAnalysis.Editing.SyntaxGenerator.SwitchStatement(Microsoft.CodeAnalysis.SyntaxNode expression, params Microsoft.CodeAnalysis.SyntaxNode[] sections) -> Microsoft.CodeAnalysis.SyntaxNode
Microsoft.CodeAnalysis.Editing.SyntaxGenerator.SyntaxGenerator() -> void
Microsoft.CodeAnalysis.Editing.SyntaxGenerator.TrueLiteralExpression() -> Microsoft.CodeAnalysis.SyntaxNode
Microsoft.CodeAnalysis.Editing.SyntaxGenerator.TryCastExpression(Microsoft.CodeAnalysis.SyntaxNode expression, Microsoft.CodeAnalysis.ITypeSymbol type) -> Microsoft.CodeAnalysis.SyntaxNode
Microsoft.CodeAnalysis.Editing.SyntaxGenerator.TryCatchStatement(System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.SyntaxNode> tryStatements, params Microsoft.CodeAnalysis.SyntaxNode[] catchClauses) -> Microsoft.CodeAnalysis.SyntaxNode
......@@ -429,9 +438,12 @@ Microsoft.CodeAnalysis.Formatting.FormattingOptions.IndentStyle.None = 0 -> Micr
Microsoft.CodeAnalysis.Formatting.FormattingOptions.IndentStyle.Smart = 2 -> Microsoft.CodeAnalysis.Formatting.FormattingOptions.IndentStyle
Microsoft.CodeAnalysis.Host.HostLanguageServices
Microsoft.CodeAnalysis.Host.HostLanguageServices.GetRequiredService<TLanguageService>() -> TLanguageService
Microsoft.CodeAnalysis.Host.HostLanguageServices.HostLanguageServices() -> void
Microsoft.CodeAnalysis.Host.HostServices
Microsoft.CodeAnalysis.Host.HostServices.HostServices() -> void
Microsoft.CodeAnalysis.Host.HostWorkspaceServices
Microsoft.CodeAnalysis.Host.HostWorkspaceServices.GetRequiredService<TWorkspaceService>() -> TWorkspaceService
Microsoft.CodeAnalysis.Host.HostWorkspaceServices.HostWorkspaceServices() -> void
Microsoft.CodeAnalysis.Host.HostWorkspaceServices.MetadataFilter
Microsoft.CodeAnalysis.Host.IAnalyzerService
Microsoft.CodeAnalysis.Host.IAnalyzerService.GetLoader() -> Microsoft.CodeAnalysis.IAnalyzerAssemblyLoader
......@@ -742,6 +754,7 @@ Microsoft.CodeAnalysis.TextDocument.TextDocument() -> void
Microsoft.CodeAnalysis.TextDocument.TryGetText(out Microsoft.CodeAnalysis.Text.SourceText text) -> bool
Microsoft.CodeAnalysis.TextDocument.TryGetTextVersion(out Microsoft.CodeAnalysis.VersionStamp version) -> bool
Microsoft.CodeAnalysis.TextLoader
Microsoft.CodeAnalysis.TextLoader.TextLoader() -> void
Microsoft.CodeAnalysis.VersionStamp
Microsoft.CodeAnalysis.VersionStamp.Equals(Microsoft.CodeAnalysis.VersionStamp version) -> bool
Microsoft.CodeAnalysis.VersionStamp.GetNewerVersion() -> Microsoft.CodeAnalysis.VersionStamp
......
static Microsoft.CodeAnalysis.Editing.DeclarationModifiers.TryParse(string value, out Microsoft.CodeAnalysis.Editing.DeclarationModifiers modifiers) -> bool
abstract Microsoft.CodeAnalysis.Editing.SyntaxGenerator.NameOfExpression(Microsoft.CodeAnalysis.SyntaxNode expression) -> Microsoft.CodeAnalysis.SyntaxNode
static Microsoft.CodeAnalysis.Editing.DeclarationModifiers.TryParse(string value, out Microsoft.CodeAnalysis.Editing.DeclarationModifiers modifiers) -> bool
\ No newline at end of file
......@@ -11,7 +11,7 @@
namespace Roslyn.Utilities
{
[SuppressMessage("ApiDesign", "RS0011", Justification = "Matching TPL Signatures")]
[SuppressMessage("ApiDesign", "CA1068", Justification = "Matching TPL Signatures")]
internal static partial class TaskExtensions
{
public static T WaitAndGetResult<T>(this Task<T> task, CancellationToken cancellationToken)
......
......@@ -8,7 +8,7 @@
namespace Roslyn.Utilities
{
[SuppressMessage("ApiDesign", "RS0011", Justification = "Matching TPL Signatures")]
[SuppressMessage("ApiDesign", "CA1068", Justification = "Matching TPL Signatures")]
internal static partial class TaskFactoryExtensions
{
public static Task SafeStartNew(this TaskFactory factory, Action action, CancellationToken cancellationToken, TaskScheduler scheduler)
......
......@@ -65,12 +65,6 @@
<Name>Workspaces</Name>
</ProjectReference>
</ItemGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<CodeAnalysisRuleSet>..\..\..\build\TestProjectRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<CodeAnalysisRuleSet>..\..\..\build\TestProjectRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Compile Include="DependentTypeFinderTests.cs" />
<Compile Include="Editting\SyntaxEditorTests.cs" />
......
......@@ -310,7 +310,8 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Classification
' x.<foo>, x...<foo> or x.@foo). Note that the name can be an XmlName in the
' case of an attribute, or an XmlBracketName, in which case, the brackets need
' to be classified as well
Dim lastChild = syntax.ChildNodesAndTokens().LastOrDefault()
Dim childNodesAndTokens = syntax.ChildNodesAndTokens()
Dim lastChild = If(childNodesAndTokens.IsEmpty, Nothing, childNodesAndTokens(childNodesAndTokens.Count - 1))
If lastChild.Kind() <> SyntaxKind.None Then
Select Case lastChild.Kind()
Case SyntaxKind.XmlName
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册