Bläddra i källkod

Set CA1032 (Implement standard exception constructors) severity to info globally

This replaces the existing [SurpressMessage] attribute
Mark Monteiro 5 år sedan
förälder
incheckning
47805d89fe
2 ändrade filer med 2 tillägg och 1 borttagningar
  1. 0 1
      Jellyfin.Drawing.Skia/SkiaCodecException.cs
  2. 2 0
      jellyfin.ruleset

+ 0 - 1
Jellyfin.Drawing.Skia/SkiaCodecException.cs

@@ -7,7 +7,6 @@ namespace Jellyfin.Drawing.Skia
     /// <summary>
     /// <summary>
     /// Represents errors that occur during interaction with Skia codecs.
     /// Represents errors that occur during interaction with Skia codecs.
     /// </summary>
     /// </summary>
-    [SuppressMessage("Design", "CA1032:Implement standard exception constructors", Justification = "A custom property, CodecResult, is required when creating this exception type.")]
     public class SkiaCodecException : SkiaException
     public class SkiaCodecException : SkiaException
     {
     {
         /// <summary>
         /// <summary>

+ 2 - 0
jellyfin.ruleset

@@ -1,6 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
 <?xml version="1.0" encoding="utf-8"?>
 <RuleSet Name="Rules for Jellyfin.Server" Description="Code analysis rules for Jellyfin.Server.csproj" ToolsVersion="14.0">
 <RuleSet Name="Rules for Jellyfin.Server" Description="Code analysis rules for Jellyfin.Server.csproj" ToolsVersion="14.0">
   <Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
   <Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
+    <!-- disable warning CA1032: Implement standard exception constructors -->
+    <Rule Id="CA1032" Action="Info" />
     <!-- disable warning SA1202: 'public' members must come before 'private' members -->
     <!-- disable warning SA1202: 'public' members must come before 'private' members -->
     <Rule Id="SA1202" Action="Info" />
     <Rule Id="SA1202" Action="Info" />
     <!-- disable warning SA1204: Static members must appear before non-static members -->
     <!-- disable warning SA1204: Static members must appear before non-static members -->