2019-01-23 11:17:45 -07:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<RuleSet Name="Rules for Jellyfin.Server" Description="Code analysis rules for Jellyfin.Server.csproj" ToolsVersion="14.0">
|
|
|
|
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
|
2021-12-24 10:28:27 -07:00
|
|
|
<!-- error on SA1000: The keyword 'new' should be followed by a space -->
|
|
|
|
<Rule Id="SA1000" Action="Error" />
|
|
|
|
<!-- error on SA1001: Commas should not be preceded by whitespace -->
|
|
|
|
<Rule Id="SA1001" Action="Error" />
|
|
|
|
<!-- error on SA1117: The parameters should all be placed on the same line or each parameter should be placed on its own line -->
|
|
|
|
<Rule Id="SA1117" Action="Error" />
|
|
|
|
<!-- error on SA1142: Refer to tuple fields by name -->
|
|
|
|
<Rule Id="SA1142" Action="Error" />
|
|
|
|
<!-- error on SA1210: Using directives should be ordered alphabetically by the namespaces -->
|
|
|
|
<Rule Id="SA1210" Action="Error" />
|
2022-01-05 02:58:57 -07:00
|
|
|
<!-- error on SA1316: Tuple element names should use correct casing -->
|
|
|
|
<Rule Id="SA1316" Action="Error" />
|
2022-01-07 03:48:59 -07:00
|
|
|
<!-- error on SA1414: Tuple types in signatures should have element names -->
|
|
|
|
<Rule Id="SA1414" Action="Error" />
|
2021-12-24 10:28:27 -07:00
|
|
|
<!-- error on SA1518: File is required to end with a single newline character -->
|
|
|
|
<Rule Id="SA1518" Action="Error" />
|
|
|
|
<!-- error on SA1629: Documentation text should end with a period -->
|
|
|
|
<Rule Id="SA1629" Action="Error" />
|
|
|
|
|
2019-10-26 14:58:23 -07:00
|
|
|
<!-- disable warning SA1009: Closing parenthesis should be followed by a space. -->
|
|
|
|
<Rule Id="SA1009" Action="None" />
|
2020-12-28 07:32:50 -07:00
|
|
|
<!-- disable warning SA1011: Closing square bracket should be followed by a space. -->
|
|
|
|
<Rule Id="SA1011" Action="None" />
|
2019-01-23 15:15:38 -07:00
|
|
|
<!-- disable warning SA1101: Prefix local calls with 'this.' -->
|
2019-01-23 11:17:45 -07:00
|
|
|
<Rule Id="SA1101" Action="None" />
|
2019-10-04 11:21:47 -07:00
|
|
|
<!-- disable warning SA1108: Block statements should not contain embedded comments -->
|
|
|
|
<Rule Id="SA1108" Action="None" />
|
2021-09-03 09:46:34 -07:00
|
|
|
<!-- disable warning SA1118: Parameter must not span multiple lines. -->
|
|
|
|
<Rule Id="SA1118" Action="None" />
|
2019-09-23 14:10:51 -07:00
|
|
|
<!-- disable warning SA1128:: Put constructor initializers on their own line -->
|
|
|
|
<Rule Id="SA1128" Action="None" />
|
2019-02-13 09:25:47 -07:00
|
|
|
<!-- disable warning SA1130: Use lambda syntax -->
|
|
|
|
<Rule Id="SA1130" Action="None" />
|
2019-01-24 10:39:51 -07:00
|
|
|
<!-- disable warning SA1200: 'using' directive must appear within a namespace declaration -->
|
2019-01-23 15:30:03 -07:00
|
|
|
<Rule Id="SA1200" Action="None" />
|
2021-05-15 11:28:15 -07:00
|
|
|
<!-- disable warning SA1202: 'public' members must come before 'private' members -->
|
|
|
|
<Rule Id="SA1202" Action="None" />
|
|
|
|
<!-- disable warning SA1204: Static members must appear before non-static members -->
|
|
|
|
<Rule Id="SA1204" Action="None" />
|
2019-01-23 15:30:38 -07:00
|
|
|
<!-- disable warning SA1309: Fields must not begin with an underscore -->
|
|
|
|
<Rule Id="SA1309" Action="None" />
|
2019-05-10 11:37:42 -07:00
|
|
|
<!-- disable warning SA1413: Use trailing comma in multi-line initializers -->
|
|
|
|
<Rule Id="SA1413" Action="None" />
|
2019-02-13 08:57:55 -07:00
|
|
|
<!-- disable warning SA1512: Single-line comments must not be followed by blank line -->
|
|
|
|
<Rule Id="SA1512" Action="None" />
|
2019-12-06 12:40:06 -07:00
|
|
|
<!-- disable warning SA1515: Single-line comment should be preceded by blank line -->
|
|
|
|
<Rule Id="SA1515" Action="None" />
|
2020-02-23 04:11:43 -07:00
|
|
|
<!-- disable warning SA1600: Elements should be documented -->
|
|
|
|
<Rule Id="SA1600" Action="None" />
|
2021-02-20 15:13:04 -07:00
|
|
|
<!-- disable warning SA1602: Enumeration items should be documented -->
|
|
|
|
<Rule Id="SA1602" Action="None" />
|
2019-01-23 15:51:46 -07:00
|
|
|
<!-- disable warning SA1633: The file header is missing or not located at the top of the file -->
|
|
|
|
<Rule Id="SA1633" Action="None" />
|
2019-01-23 11:17:45 -07:00
|
|
|
</Rules>
|
2019-05-10 11:37:42 -07:00
|
|
|
|
2021-03-08 19:04:47 -07:00
|
|
|
<Rules AnalyzerId="Microsoft.CodeAnalysis.NetAnalyzers" RuleNamespace="Microsoft.Design">
|
2022-02-15 10:59:46 -07:00
|
|
|
<!-- error on CA1001: Types that own disposable fields should be disposable -->
|
|
|
|
<Rule Id="CA1001" Action="Error" />
|
|
|
|
<!-- error on CA1012: Abstract types should not have public constructors -->
|
|
|
|
<Rule Id="CA1012" Action="Error" />
|
2021-11-15 07:57:07 -07:00
|
|
|
<!-- error on CA1063: Implement IDisposable correctly -->
|
|
|
|
<Rule Id="CA1063" Action="Error" />
|
2021-09-03 09:46:34 -07:00
|
|
|
<!-- error on CA1305: Specify IFormatProvider -->
|
|
|
|
<Rule Id="CA1305" Action="Error" />
|
2021-11-15 07:57:07 -07:00
|
|
|
<!-- error on CA1307: Specify StringComparison for clarity -->
|
|
|
|
<Rule Id="CA1307" Action="Error" />
|
|
|
|
<!-- error on CA1309: Use ordinal StringComparison -->
|
|
|
|
<Rule Id="CA1309" Action="Error" />
|
2021-09-03 09:46:34 -07:00
|
|
|
<!-- error on CA1725: Parameter names should match base declaration -->
|
|
|
|
<Rule Id="CA1725" Action="Error" />
|
2021-11-09 05:14:31 -07:00
|
|
|
<!-- error on CA1725: Call async methods when in an async method -->
|
|
|
|
<Rule Id="CA1727" Action="Error" />
|
2021-11-16 08:31:57 -07:00
|
|
|
<!-- error on CA1813: Avoid unsealed attributes -->
|
|
|
|
<Rule Id="CA1813" Action="Error" />
|
2021-11-09 14:29:33 -07:00
|
|
|
<!-- error on CA1843: Do not use 'WaitAll' with a single task -->
|
|
|
|
<Rule Id="CA1843" Action="Error" />
|
2021-11-16 08:31:57 -07:00
|
|
|
<!-- error on CA1845: Use span-based 'string.Concat' -->
|
|
|
|
<Rule Id="CA1845" Action="Error" />
|
2022-01-07 03:48:59 -07:00
|
|
|
<!-- error on CA1849: Call async methods when in an async method -->
|
|
|
|
<Rule Id="CA1849" Action="Error" />
|
2021-02-15 06:19:08 -07:00
|
|
|
<!-- error on CA2016: Forward the CancellationToken parameter to methods that take one
|
|
|
|
or pass in 'CancellationToken.None' explicitly to indicate intentionally not propagating the token -->
|
|
|
|
<Rule Id="CA2016" Action="Error" />
|
2022-02-15 10:59:46 -07:00
|
|
|
<!-- error on CA2215: Dispose methods should call base class dispose -->
|
|
|
|
<Rule Id="CA2215" Action="Error" />
|
2021-11-09 14:29:33 -07:00
|
|
|
<!-- error on CA2254: Template should be a static expression -->
|
|
|
|
<Rule Id="CA2254" Action="Error" />
|
2021-02-15 06:19:08 -07:00
|
|
|
|
2021-06-26 17:00:17 -07:00
|
|
|
<!-- disable warning CA1014: Mark assemblies with CLSCompliantAttribute -->
|
|
|
|
<Rule Id="CA1014" Action="Info" />
|
2021-05-15 12:49:04 -07:00
|
|
|
<!-- disable warning CA1024: Use properties where appropriate -->
|
|
|
|
<Rule Id="CA1024" Action="Info" />
|
2019-05-10 11:37:42 -07:00
|
|
|
<!-- disable warning CA1031: Do not catch general exception types -->
|
|
|
|
<Rule Id="CA1031" Action="Info" />
|
2019-12-10 16:13:57 -07:00
|
|
|
<!-- disable warning CA1032: Implement standard exception constructors -->
|
|
|
|
<Rule Id="CA1032" Action="Info" />
|
2021-09-09 06:59:13 -07:00
|
|
|
<!-- disable warning CA1040: Avoid empty interfaces -->
|
|
|
|
<Rule Id="CA1040" Action="Info" />
|
2019-06-14 09:49:57 -07:00
|
|
|
<!-- disable warning CA1062: Validate arguments of public methods -->
|
|
|
|
<Rule Id="CA1062" Action="Info" />
|
2021-09-09 06:59:13 -07:00
|
|
|
<!-- TODO: enable when false positives are fixed -->
|
|
|
|
<!-- disable warning CA1508: Avoid dead conditional code -->
|
|
|
|
<Rule Id="CA1508" Action="Info" />
|
2019-12-10 16:13:57 -07:00
|
|
|
<!-- disable warning CA1716: Identifiers should not match keywords -->
|
|
|
|
<Rule Id="CA1716" Action="Info" />
|
2019-11-01 10:45:16 -07:00
|
|
|
<!-- disable warning CA1720: Identifiers should not contain type names -->
|
|
|
|
<Rule Id="CA1720" Action="Info" />
|
2021-09-09 06:59:13 -07:00
|
|
|
<!-- disable warning CA1724: Type names should not match namespaces -->
|
|
|
|
<Rule Id="CA1724" Action="Info" />
|
2021-03-08 19:04:47 -07:00
|
|
|
<!-- disable warning CA1805: Do not initialize unnecessarily -->
|
|
|
|
<Rule Id="CA1805" Action="Info" />
|
2019-02-28 15:22:57 -07:00
|
|
|
<!-- disable warning CA1812: internal class that is apparently never instantiated.
|
|
|
|
If so, remove the code from the assembly.
|
|
|
|
If this class is intended to contain only static members, make it static -->
|
|
|
|
<Rule Id="CA1812" Action="Info" />
|
2019-03-25 14:25:32 -07:00
|
|
|
<!-- disable warning CA1822: Member does not access instance data and can be marked as static -->
|
|
|
|
<Rule Id="CA1822" Action="Info" />
|
2019-12-10 16:13:57 -07:00
|
|
|
<!-- disable warning CA2000: Dispose objects before losing scope -->
|
|
|
|
<Rule Id="CA2000" Action="Info" />
|
2021-11-09 05:14:31 -07:00
|
|
|
<!-- disable warning CA2253: Named placeholders should not be numeric values -->
|
|
|
|
<Rule Id="CA2253" Action="Info" />
|
2021-03-08 19:04:47 -07:00
|
|
|
<!-- disable warning CA5394: Do not use insecure randomness -->
|
|
|
|
<Rule Id="CA5394" Action="Info" />
|
2019-03-25 14:25:32 -07:00
|
|
|
|
2019-02-13 10:47:26 -07:00
|
|
|
<!-- disable warning CA1054: Change the type of parameter url from string to System.Uri -->
|
|
|
|
<Rule Id="CA1054" Action="None" />
|
2019-12-10 16:13:57 -07:00
|
|
|
<!-- disable warning CA1055: URI return values should not be strings -->
|
|
|
|
<Rule Id="CA1055" Action="None" />
|
|
|
|
<!-- disable warning CA1056: URI properties should not be strings -->
|
|
|
|
<Rule Id="CA1056" Action="None" />
|
2019-06-14 09:49:57 -07:00
|
|
|
<!-- disable warning CA1303: Do not pass literals as localized parameters -->
|
|
|
|
<Rule Id="CA1303" Action="None" />
|
2019-10-04 10:55:14 -07:00
|
|
|
<!-- disable warning CA1308: Normalize strings to uppercase -->
|
|
|
|
<Rule Id="CA1308" Action="None" />
|
2021-11-09 05:14:31 -07:00
|
|
|
<!-- disable warning CA1848: Use the LoggerMessage delegates -->
|
|
|
|
<Rule Id="CA1848" Action="None" />
|
2021-04-10 15:35:32 -07:00
|
|
|
<!-- disable warning CA2101: Specify marshaling for P/Invoke string arguments -->
|
|
|
|
<Rule Id="CA2101" Action="None" />
|
2021-06-26 17:00:17 -07:00
|
|
|
<!-- disable warning CA2234: Pass System.Uri objects instead of strings -->
|
|
|
|
<Rule Id="CA2234" Action="None" />
|
2019-02-13 10:47:26 -07:00
|
|
|
</Rules>
|
2022-01-22 08:48:31 -07:00
|
|
|
|
|
|
|
<Rules AnalyzerId="Microsoft.CodeAnalysis.BannedApiAnalyzers" RuleNamespace="Microsoft.Design">
|
|
|
|
<!-- error on RS0030: Do not used banned APIs -->
|
|
|
|
<Rule Id="RS0030" Action="Error" />
|
|
|
|
</Rules>
|
2019-01-23 11:17:45 -07:00
|
|
|
</RuleSet>
|