jellyfin.ruleset 5.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <RuleSet Name="Rules for Jellyfin.Server" Description="Code analysis rules for Jellyfin.Server.csproj" ToolsVersion="14.0">
  3. <Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
  4. <!-- disable warning SA1009: Closing parenthesis should be followed by a space. -->
  5. <Rule Id="SA1009" Action="None" />
  6. <!-- disable warning SA1011: Closing square bracket should be followed by a space. -->
  7. <Rule Id="SA1011" Action="None" />
  8. <!-- disable warning SA1101: Prefix local calls with 'this.' -->
  9. <Rule Id="SA1101" Action="None" />
  10. <!-- disable warning SA1108: Block statements should not contain embedded comments -->
  11. <Rule Id="SA1108" Action="None" />
  12. <!-- disable warning SA1118: Parameter must not span multiple lines. -->
  13. <Rule Id="SA1118" Action="None" />
  14. <!-- disable warning SA1128:: Put constructor initializers on their own line -->
  15. <Rule Id="SA1128" Action="None" />
  16. <!-- disable warning SA1130: Use lambda syntax -->
  17. <Rule Id="SA1130" Action="None" />
  18. <!-- disable warning SA1200: 'using' directive must appear within a namespace declaration -->
  19. <Rule Id="SA1200" Action="None" />
  20. <!-- disable warning SA1202: 'public' members must come before 'private' members -->
  21. <Rule Id="SA1202" Action="None" />
  22. <!-- disable warning SA1204: Static members must appear before non-static members -->
  23. <Rule Id="SA1204" Action="None" />
  24. <!-- disable warning SA1309: Fields must not begin with an underscore -->
  25. <Rule Id="SA1309" Action="None" />
  26. <!-- disable warning SA1413: Use trailing comma in multi-line initializers -->
  27. <Rule Id="SA1413" Action="None" />
  28. <!-- disable warning SA1512: Single-line comments must not be followed by blank line -->
  29. <Rule Id="SA1512" Action="None" />
  30. <!-- disable warning SA1515: Single-line comment should be preceded by blank line -->
  31. <Rule Id="SA1515" Action="None" />
  32. <!-- disable warning SA1600: Elements should be documented -->
  33. <Rule Id="SA1600" Action="None" />
  34. <!-- disable warning SA1602: Enumeration items should be documented -->
  35. <Rule Id="SA1602" Action="None" />
  36. <!-- disable warning SA1633: The file header is missing or not located at the top of the file -->
  37. <Rule Id="SA1633" Action="None" />
  38. </Rules>
  39. <Rules AnalyzerId="Microsoft.CodeAnalysis.NetAnalyzers" RuleNamespace="Microsoft.Design">
  40. <!-- error on CA1305: Specify IFormatProvider -->
  41. <Rule Id="CA1305" Action="Error" />
  42. <!-- error on CA1725: Parameter names should match base declaration -->
  43. <Rule Id="CA1725" Action="Error" />
  44. <!-- error on CA2016: Forward the CancellationToken parameter to methods that take one
  45. or pass in 'CancellationToken.None' explicitly to indicate intentionally not propagating the token -->
  46. <Rule Id="CA2016" Action="Error" />
  47. <!-- disable warning CA1014: Mark assemblies with CLSCompliantAttribute -->
  48. <Rule Id="CA1014" Action="Info" />
  49. <!-- disable warning CA1024: Use properties where appropriate -->
  50. <Rule Id="CA1024" Action="Info" />
  51. <!-- disable warning CA1031: Do not catch general exception types -->
  52. <Rule Id="CA1031" Action="Info" />
  53. <!-- disable warning CA1032: Implement standard exception constructors -->
  54. <Rule Id="CA1032" Action="Info" />
  55. <!-- disable warning CA1040: Avoid empty interfaces -->
  56. <Rule Id="CA1040" Action="Info" />
  57. <!-- disable warning CA1062: Validate arguments of public methods -->
  58. <Rule Id="CA1062" Action="Info" />
  59. <!-- TODO: enable when false positives are fixed -->
  60. <!-- disable warning CA1508: Avoid dead conditional code -->
  61. <Rule Id="CA1508" Action="Info" />
  62. <!-- disable warning CA1716: Identifiers should not match keywords -->
  63. <Rule Id="CA1716" Action="Info" />
  64. <!-- disable warning CA1720: Identifiers should not contain type names -->
  65. <Rule Id="CA1720" Action="Info" />
  66. <!-- disable warning CA1724: Type names should not match namespaces -->
  67. <Rule Id="CA1724" Action="Info" />
  68. <!-- disable warning CA1805: Do not initialize unnecessarily -->
  69. <Rule Id="CA1805" Action="Info" />
  70. <!-- disable warning CA1812: internal class that is apparently never instantiated.
  71. If so, remove the code from the assembly.
  72. If this class is intended to contain only static members, make it static -->
  73. <Rule Id="CA1812" Action="Info" />
  74. <!-- disable warning CA1822: Member does not access instance data and can be marked as static -->
  75. <Rule Id="CA1822" Action="Info" />
  76. <!-- disable warning CA2000: Dispose objects before losing scope -->
  77. <Rule Id="CA2000" Action="Info" />
  78. <!-- disable warning CA5394: Do not use insecure randomness -->
  79. <Rule Id="CA5394" Action="Info" />
  80. <!-- disable warning CA1054: Change the type of parameter url from string to System.Uri -->
  81. <Rule Id="CA1054" Action="None" />
  82. <!-- disable warning CA1055: URI return values should not be strings -->
  83. <Rule Id="CA1055" Action="None" />
  84. <!-- disable warning CA1056: URI properties should not be strings -->
  85. <Rule Id="CA1056" Action="None" />
  86. <!-- disable warning CA1303: Do not pass literals as localized parameters -->
  87. <Rule Id="CA1303" Action="None" />
  88. <!-- disable warning CA1308: Normalize strings to uppercase -->
  89. <Rule Id="CA1308" Action="None" />
  90. <!-- disable warning CA2101: Specify marshaling for P/Invoke string arguments -->
  91. <Rule Id="CA2101" Action="None" />
  92. <!-- disable warning CA2234: Pass System.Uri objects instead of strings -->
  93. <Rule Id="CA2234" Action="None" />
  94. </Rules>
  95. </RuleSet>