Ban the usage of Task.Result

If the calling function can't be made async easily you can still use
.GetAwaiter().GetResult(), which is way easier to find in the future
This commit is contained in:
Bond_009
2022-01-22 16:48:31 +01:00
parent cd675475bc
commit 2dcb2f8a9f
47 changed files with 172 additions and 10 deletions

View File

@@ -136,4 +136,9 @@
<!-- disable warning CA2234: Pass System.Uri objects instead of strings -->
<Rule Id="CA2234" Action="None" />
</Rules>
<Rules AnalyzerId="Microsoft.CodeAnalysis.BannedApiAnalyzers" RuleNamespace="Microsoft.Design">
<!-- error on RS0030: Do not used banned APIs -->
<Rule Id="RS0030" Action="Error" />
</Rules>
</RuleSet>