Add Menees.Analyzers and update FxCop

This commit is contained in:
YoshiRulz 2020-05-26 16:54:53 +10:00
parent 162a151451
commit 3e5aa1a65f
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
2 changed files with 34 additions and 4 deletions

View File

@ -1,5 +1,33 @@
<?xml version="1.0"?>
<RuleSet Name="BizHawk Rules" Description="Applies to all projects in the solution -- or, it will eventually." ToolsVersion="14.0">
<Rules AnalyzerId="Menees.Analyzers" RuleNamespace="Menees.Analyzers">
<!-- Line is too long -->
<Rule Id="MEN002" Action="Hidden" />
<!-- Method is too long -->
<Rule Id="MEN003" Action="Hidden" />
<!-- Property accessor is too long -->
<Rule Id="MEN004" Action="Hidden" />
<!-- File is too long -->
<Rule Id="MEN005" Action="Hidden" />
<!-- File name should match type -->
<Rule Id="MEN008" Action="Hidden" />
<!-- Use the preferred exception type -->
<Rule Id="MEN009" Action="Hidden" />
<!-- Align using directives -->
<Rule Id="MEN011" Action="Hidden" />
<!-- Flags should be powers of two -->
<Rule Id="MEN012" Action="Hidden" />
<!-- Use UTC time -->
<Rule Id="MEN013" Action="Hidden" />
</Rules>
<Rules AnalyzerId="Microsoft.CodeAnalysis.FxCopAnalyzers" RuleNamespace="Microsoft.CodeAnalysis.FxCopAnalyzers">
<!-- Types that own disposable fields should be disposable -->
<Rule Id="CA1001" Action="Hidden" />
@ -67,6 +95,9 @@
<!-- Type {0} should implement IEquatable<T> because it overrides Equals -->
<Rule Id="CA1066" Action="Hidden" />
<!-- Enums values should not be duplicated -->
<Rule Id="CA1069" Action="Hidden" />
<!-- Do not pass literals as localized parameters -->
<Rule Id="CA1303" Action="Hidden" />

View File

@ -8,10 +8,9 @@
<ItemGroup>
<PackageReference Include="System.ComponentModel.Annotations" Version="4.7.0" />
<PackageReference Include="System.Reflection.Emit.Lightweight" Version="4.7.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.8"
Condition=" '$(MachineRunAnalyzersDuringBuild)' != '' " />
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.164"
Condition=" '$(MachineRunAnalyzersDuringBuild)' != '' " />
<PackageReference Include="Menees.Analyzers" Version="2.0.4" Condition=" '$(MachineRunAnalyzersDuringBuild)' != '' " />
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.0.0" Condition=" '$(MachineRunAnalyzersDuringBuild)' != '' " />
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.164" Condition=" '$(MachineRunAnalyzersDuringBuild)' != '' " />
<ProjectReference Include="$(ProjectDir)../Version/Version.csproj" />
<Compile Include="$(ProjectDir)../Version/svnrev.cs" />
<Compile Include="$(ProjectDir)../Version/VersionInfo.cs" />