Skip to content

Commit

Permalink
Ban Compilation.GetTypeByMetadataName
Browse files Browse the repository at this point in the history
  • Loading branch information
drewnoakes authored and dotpaul committed Oct 23, 2019
1 parent 3118ec7 commit 4332f3a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/BannedSymbols.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
M:Microsoft.CodeAnalysis.Compilation.GetTypeByMetadataName(System.String); Use WellKnownTypeProvider instead
5 changes: 5 additions & 0 deletions src/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
<UpToDateCheckInput Include="$(MSBuildThisFileDirectory)..\eng\Analyzers_ShippingRules.ruleset" Condition="'$(CodeAnalysisRuleSet)' == '$(MSBuildThisFileDirectory)..\build\Analyzers_NonShippingRules.ruleset'" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="2.9.6" />
<AdditionalFiles Include="$(MSBuildThisFileDirectory)\BannedSymbols.txt" Condition="'$(BannedSymbolsOptOut)' != 'true'" />
</ItemGroup>

<PropertyGroup>
<!-- Workaround for https://github.com/dotnet/roslyn/issues/25041 -->
<MSBuildAllProjects Condition="'$(CodeAnalysisRuleSet)' == '$(MSBuildThisFileDirectory)..\eng\Analyzers_NonShippingRules.ruleset'">$(MSBuildAllProjects);$(MSBuildThisFileDirectory)..\build\Analyzers_ShippingRules.ruleset</MSBuildAllProjects>
Expand Down

0 comments on commit 4332f3a

Please sign in to comment.