Skip to content

Commit 1999616

Browse files
authored
use built in CA2007 (#1277)
1 parent 8dbcc5c commit 1999616

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/CodeAnalysis.ruleset

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<RuleSet Name="Microsoft.Analyzers.ManagedCodeAnalysis" Description="Microsoft.Analyzers.ManagedCodeAnalysis" ToolsVersion="14.0">
2+
<Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed">
3+
<Rule Id="CA2007" Action="Error" /> <!-- Consider calling ConfigureAwait on the awaited task -->
4+
</Rules>
5+
</RuleSet>

src/Directory.Build.props

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
3535

3636
<Nullable>annotations</Nullable>
37+
38+
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)CodeAnalysis.ruleset</CodeAnalysisRuleSet>
3739
</PropertyGroup>
3840

3941
<!-- Use nullability analysis only on frameworks that have annotated BCL -->
@@ -57,7 +59,6 @@
5759

5860
<ItemGroup>
5961
<PackageReference Include="SIL.ReleaseTasks" Version="2.5.0" PrivateAssets="All" Condition="'$(Configuration)' != 'Debug'"/>
60-
<PackageReference Include="ConfigureAwaitChecker.Analyzer" Version="4.0.0" PrivateAssets="All" Condition="'$(Configuration)' != 'Debug'"/>
6162
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.0-beta-20204-02" PrivateAssets="All" />
6263
</ItemGroup>
6364

0 commit comments

Comments
 (0)