Skip to content

Commit

Permalink
Update RDG to use interceptors feature
Browse files Browse the repository at this point in the history
  • Loading branch information
captainsafia committed Jun 29, 2023
1 parent c7b4724 commit 4870eea
Show file tree
Hide file tree
Showing 63 changed files with 7,882 additions and 8,304 deletions.
2 changes: 1 addition & 1 deletion eng/SourceBuildPrebuiltBaseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<!-- These are what the analyzers are built against. They are overridden in full source build.
It may be possible to generate SBRPs -->
<UsagePattern IdentityGlob="Microsoft.CodeAnalysis.Analyzers/*2.9.4*" />
<UsagePattern IdentityGlob="Microsoft.CodeAnalysis.AnalyzerUtilities/*3.3.0*" />
<UsagePattern IdentityGlob="Microsoft.CodeAnalysis.AnalyzerUtilities/*3.3.5*" />
<UsagePattern IdentityGlob="Microsoft.CodeAnalysis.Common/*3.3.1*" />
<UsagePattern IdentityGlob="Microsoft.CodeAnalysis.CSharp/*3.3.1*" />
<UsagePattern IdentityGlob="Microsoft.CodeAnalysis.CSharp.Workspaces/*3.3.1*" />
Expand Down
21 changes: 13 additions & 8 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,11 @@
<Sha>0d04efdab9f26bad07edc881dc7fa088337b8562</Sha>
<SourceBuild RepoName="source-build-externals" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.SourceBuild.Intermediate.symreader" Version="2.0.0-beta-23228-03">
<Uri>https://github.com/dotnet/symreader</Uri>
<Sha>27e584661980ee6d82c419a2a471ae505b7d122e</Sha>
<SourceBuild RepoName="symreader" ManagedOnly="true" />
</Dependency>
<Dependency Name="System.Configuration.ConfigurationManager" Version="8.0.0-preview.7.23326.5">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f0b4bb9c627e43f5f750a995a11c8611bbaf26d6</Sha>
Expand Down Expand Up @@ -335,22 +340,22 @@
<SourceBuild RepoName="source-build-reference-packages" ManagedOnly="true" />
</Dependency>
<!-- Not updated automatically -->
<Dependency Name="Microsoft.CodeAnalysis.Common" Version="4.4.0-4.22520.2">
<Dependency Name="Microsoft.CodeAnalysis.Common" Version="4.7.0-3.23314.3">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>65df6b1065bae316232a6c9907a8be995302fb5e</Sha>
<Sha>1aa759af23d2a29043ea44fcef5bd6823dafa5d0</Sha>
<SourceBuild RepoName="roslyn" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.ExternalAccess.AspNetCore" Version="4.4.0-4.22520.2">
<Dependency Name="Microsoft.CodeAnalysis.ExternalAccess.AspNetCore" Version="4.7.0-3.23314.3">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>65df6b1065bae316232a6c9907a8be995302fb5e</Sha>
<Sha>1aa759af23d2a29043ea44fcef5bd6823dafa5d0</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.CSharp" Version="4.4.0-4.22520.2">
<Dependency Name="Microsoft.CodeAnalysis.CSharp" Version="4.7.0-3.23314.3">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>65df6b1065bae316232a6c9907a8be995302fb5e</Sha>
<Sha>1aa759af23d2a29043ea44fcef5bd6823dafa5d0</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.4.0-4.22520.2">
<Dependency Name="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.7.0-3.23314.3">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>65df6b1065bae316232a6c9907a8be995302fb5e</Sha>
<Sha>1aa759af23d2a29043ea44fcef5bd6823dafa5d0</Sha>
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
Expand Down
20 changes: 11 additions & 9 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,10 @@
<MicrosoftEntityFrameworkCoreVersion>8.0.0-preview.7.23327.3</MicrosoftEntityFrameworkCoreVersion>
<MicrosoftEntityFrameworkCoreDesignVersion>8.0.0-preview.7.23327.3</MicrosoftEntityFrameworkCoreDesignVersion>
<!-- Packages from dotnet/roslyn -->
<MicrosoftCodeAnalysisCommonVersion>4.4.0-4.22520.2</MicrosoftCodeAnalysisCommonVersion>
<MicrosoftCodeAnalysisExternalAccessAspNetCoreVersion>4.4.0-4.22520.2</MicrosoftCodeAnalysisExternalAccessAspNetCoreVersion>
<MicrosoftCodeAnalysisCSharpVersion>4.4.0-4.22520.2</MicrosoftCodeAnalysisCSharpVersion>
<MicrosoftCodeAnalysisCSharpWorkspacesVersion>4.4.0-4.22520.2</MicrosoftCodeAnalysisCSharpWorkspacesVersion>
<MicrosoftCodeAnalysisCommonVersion>4.7.0-3.23314.3</MicrosoftCodeAnalysisCommonVersion>
<MicrosoftCodeAnalysisExternalAccessAspNetCoreVersion>4.7.0-3.23314.3</MicrosoftCodeAnalysisExternalAccessAspNetCoreVersion>
<MicrosoftCodeAnalysisCSharpVersion>4.7.0-3.23314.3</MicrosoftCodeAnalysisCSharpVersion>
<MicrosoftCodeAnalysisCSharpWorkspacesVersion>4.7.0-3.23314.3</MicrosoftCodeAnalysisCSharpWorkspacesVersion>
<!-- Packages from NuGet/Nuget.client -->
<!-- If you update these versions, make sure to also update https://github.com/dotnet/aspnetcore/blob/main/eng/SourceBuildPrebuiltBaseline.xml -->
<NuGetPackagingVersion>6.2.4</NuGetPackagingVersion>
Expand All @@ -165,6 +165,8 @@
<MicrosoftSourceBuildIntermediatesourcebuildexternalsVersion>8.0.0-alpha.1.23319.1</MicrosoftSourceBuildIntermediatesourcebuildexternalsVersion>
<!-- Packages from dotnet/source-build-reference-packages -->
<MicrosoftSourceBuildIntermediatesourcebuildreferencepackagesVersion>8.0.0-alpha.1.23326.1</MicrosoftSourceBuildIntermediatesourcebuildreferencepackagesVersion>
<!-- Packages from dotnet/symreader -->
<MicrosoftSourceBuildIntermediatesymreaderVersion>2.0.0-beta-23228-03</MicrosoftSourceBuildIntermediatesymreaderVersion>
<!-- Packages from dotnet/xdt -->
<MicrosoftWebXdtVersion>7.0.0-preview.22423.2</MicrosoftWebXdtVersion>
</PropertyGroup>
Expand Down Expand Up @@ -241,11 +243,11 @@
<Analyzer_MicrosoftCodeAnalysisCSharpWorkspacesVersion>3.3.1</Analyzer_MicrosoftCodeAnalysisCSharpWorkspacesVersion>
<!-- Pin the version of the M.CA dependencies that we utilize with a cutom version property $(MicrosoftCodeAnalysisVersion_LatestVS) to avoid automatically
consuming the newest version of the packages when using the $(MicrosoftCodeAnalysisCSharpVersion) properties in source-build. -->
<MicrosoftCodeAnalysisVersion_LatestVS>4.5.0</MicrosoftCodeAnalysisVersion_LatestVS>
<MicrosoftCodeAnalysisExternalAccessAspNetCoreVersion>4.4.0-4.22520.2</MicrosoftCodeAnalysisExternalAccessAspNetCoreVersion>
<MicrosoftCodeAnalysisCommonVersion>4.4.0-4.22520.2</MicrosoftCodeAnalysisCommonVersion>
<MicrosoftCodeAnalysisCSharpVersion>4.4.0-4.22520.2</MicrosoftCodeAnalysisCSharpVersion>
<MicrosoftCodeAnalysisCSharpWorkspacesVersion>4.4.0-4.22520.2</MicrosoftCodeAnalysisCSharpWorkspacesVersion>
<MicrosoftCodeAnalysisVersion_LatestVS>4.7.0-3.23314.3</MicrosoftCodeAnalysisVersion_LatestVS>
<MicrosoftCodeAnalysisExternalAccessAspNetCoreVersion>4.7.0-3.23314.3</MicrosoftCodeAnalysisExternalAccessAspNetCoreVersion>
<MicrosoftCodeAnalysisCommonVersion>4.7.0-3.23314.3</MicrosoftCodeAnalysisCommonVersion>
<MicrosoftCodeAnalysisCSharpVersion>4.7.0-3.23314.3</MicrosoftCodeAnalysisCSharpVersion>
<MicrosoftCodeAnalysisCSharpWorkspacesVersion>4.7.0-3.23314.3</MicrosoftCodeAnalysisCSharpWorkspacesVersion>
<MicrosoftCodeAnalysisPublicApiAnalyzersVersion>3.3.3</MicrosoftCodeAnalysisPublicApiAnalyzersVersion>
<MicrosoftCodeAnalysisCSharpAnalyzerTestingXUnitVersion>1.1.2-beta1.22531.1</MicrosoftCodeAnalysisCSharpAnalyzerTestingXUnitVersion>
<MicrosoftCodeAnalysisCSharpCodeFixTestingXUnitVersion>1.1.2-beta1.22531.1</MicrosoftCodeAnalysisCSharpCodeFixTestingXUnitVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<Nullable>Enable</Nullable>
<RootNamespace>Microsoft.AspNetCore.Analyzers</RootNamespace>
<SuppressNullableAttributesImport>true</SuppressNullableAttributesImport>
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@
<value>Route handler has multiple parameters with the [FromBody] attribute or a parameter with an [AsParameters] attribute where the parameter type contains multiple members with [FromBody] attributes. Only one parameter can have a [FromBody] attribute.</value>
</data>
<data name="Analyzer_MultipleFromBody_Title" xml:space="preserve">
<value>Route handler has multiple parameters with the [FromBody] attribute.</value>
<value>Route handler has multiple parameters with the [FromBody] attribute</value>
</data>
<data name="Analyzer_DoNotUseModelBindingAttributesOnRouteHandlerParameters_Title" xml:space="preserve">
<value>Do not use model binding attributes with route handlers</value>
Expand Down Expand Up @@ -289,10 +289,10 @@
<value>Complex types referenced by route parameters must be parsable</value>
</data>
<data name="Analyzer_RouteParameterComplexTypeIsNotParsable_Message" xml:space="preserve">
<value>Parameter '{0}' of type {1} should define a bool TryParse(string, IFormatProvider, out {1}) method, or implement IParsable&lt;{1}&gt;.</value>
<value>Parameter '{0}' of type {1} should define a bool TryParse(string, IFormatProvider, out {1}) method, or implement IParsable&lt;{1}&gt;</value>
</data>
<data name="Analyzer_BindAsyncSignatureMustReturnValueTaskOfT_Title" xml:space="preserve">
<value>When implementing BindAsync(...) method, the return type must be ValueTask&lt;T&gt;.</value>
<value>When implementing BindAsync(...) method, the return type must be ValueTask&lt;T&gt;</value>
</data>
<data name="Analyzer_BindAsyncSignatureMustReturnValueTaskOfT_Message" xml:space="preserve">
<value>Parameter '{0}' of type {1} has a BindAsync(...) method, but the return type is not ValueTask&lt;{1}&gt;. Consider implementing IBindableFromHttpContext&lt;{1}&gt; to enforce implementation.</value>
Expand All @@ -310,7 +310,7 @@
<value>Route '{0}' conflicts with another action route. An HTTP request that matches multiple routes results in an ambiguous match error. Fix the conflict by changing the route's pattern, HTTP method, or route constraints.</value>
</data>
<data name="Analyzer_UseAddAuthorizationBuilder_Message" xml:space="preserve">
<value>Use AddAuthorizationBuilder to register authorization services and construct policies.</value>
<value>When implementing BindAsync(...) method, the return type must be ValueTask&lt;T&gt;</value>
</data>
<data name="Analyzer_UseAddAuthorizationBuilder_Title" xml:space="preserve">
<value>Use AddAuthorizationBuilder</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
<PreserveCompilationContext>true</PreserveCompilationContext>
<RootNamespace>Microsoft.AspNetCore.Analyzers</RootNamespace>
<!-- Disable analyzer warnings for analyzers in test project. -->
<NoWarn>$(NoWarn);RS1036;RS2008</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<Compile Include="$(SharedSourceRoot)RoslynUtils\SyntaxTreeExtensions.cs" LinkBase="Shared" />
<Compile Include="$(SharedSourceRoot)RoslynUtils\ParsabilityHelper.cs" LinkBase="Shared" />
<Compile Include="$(SharedSourceRoot)RoslynUtils\CodeWriter.cs" LinkBase="Shared" />
<Compile Include="$(SharedSourceRoot)RoslynUtils\IncrementalValuesProviderExtensions.cs" LinkBase="Shared" />
<Compile Include="$(SharedSourceRoot)Diagnostics\AnalyzerDebug.cs" LinkBase="Shared" />
</ItemGroup>

Expand Down
Loading

0 comments on commit 4870eea

Please sign in to comment.