diff options
| author | Joshua M. Boniface <joshua@boniface.me> | 2019-01-24 14:07:01 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-24 14:07:01 -0500 |
| commit | 1d7d4c573875093b97a5929fdee976cd0dcbedea (patch) | |
| tree | 8af78ab36731a998807633e5b76d26f26de9faed | |
| parent | 3701ce40375fc13987174f843b61b2d757d4a11f (diff) | |
| parent | f4015f82e0b143d1708f9dbf878a19ac669419a1 (diff) | |
Merge pull request #686 from Bond-009/analyzers
Disable some StyleCop warnings
| -rw-r--r-- | Jellyfin.Server/Jellyfin.Server.csproj | 5 | ||||
| -rw-r--r-- | jellyfin.ruleset | 13 |
2 files changed, 18 insertions, 0 deletions
diff --git a/Jellyfin.Server/Jellyfin.Server.csproj b/Jellyfin.Server/Jellyfin.Server.csproj index 897d93339..0622d94b8 100644 --- a/Jellyfin.Server/Jellyfin.Server.csproj +++ b/Jellyfin.Server/Jellyfin.Server.csproj @@ -27,6 +27,11 @@ <PackageReference Include="SerilogAnalyzer" Version="0.15.0" /> </ItemGroup> + <PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> + <RunCodeAnalysis>true</RunCodeAnalysis> + <CodeAnalysisRuleSet>../jellyfin.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <ItemGroup> <PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="2.2.0" /> <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.2.0" /> diff --git a/jellyfin.ruleset b/jellyfin.ruleset new file mode 100644 index 000000000..0f8c9aa02 --- /dev/null +++ b/jellyfin.ruleset @@ -0,0 +1,13 @@ +<?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"> + <!-- disable warning SA1101: Prefix local calls with 'this.' --> + <Rule Id="SA1101" Action="None" /> + <!-- disable warning SA1200: 'using' directive must appear within a namespace declaration --> + <Rule Id="SA1200" Action="None" /> + <!-- disable warning SA1309: Fields must not begin with an underscore --> + <Rule Id="SA1309" Action="None" /> + <!-- disable warning SA1633: The file header is missing or not located at the top of the file --> + <Rule Id="SA1633" Action="None" /> + </Rules> +</RuleSet> |
