aboutsummaryrefslogtreecommitdiff
path: root/jellyfin.ruleset
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2022-01-22 16:48:31 +0100
committerBond_009 <bond.009@outlook.com>2022-01-22 16:48:31 +0100
commit2dcb2f8a9f4be9ca69c050ce9ee94d647e8d5d5f (patch)
tree3379ed498180e79fd7ce7747d7c67fb053d7a314 /jellyfin.ruleset
parentcd675475bc5f37d4b20ed71271b17d0945b3f969 (diff)
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
Diffstat (limited to 'jellyfin.ruleset')
-rw-r--r--jellyfin.ruleset5
1 files changed, 5 insertions, 0 deletions
diff --git a/jellyfin.ruleset b/jellyfin.ruleset
index dea1a748b6..cc7c54b979 100644
--- a/jellyfin.ruleset
+++ b/jellyfin.ruleset
@@ -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>