Add `Roslynator.Analyzers`

This commit is contained in:
YoshiRulz 2025-01-29 18:48:10 +10:00
parent 12cd7885ec
commit 8332a6bd5e
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
4 changed files with 20 additions and 1 deletions

View File

@ -395,6 +395,23 @@ dotnet_diagnostic.MEN016.severity = silent
# Use Digit Separators
dotnet_diagnostic.MEN018.severity = warning
## Roslynator.Analyzers rules
# Avoid locking on publicly accessible instance
dotnet_diagnostic.RCS1059.severity = silent
# Avoid empty catch clause that catches System.Exception
dotnet_diagnostic.RCS1075.severity = silent
# Make class static
dotnet_diagnostic.RCS1102.severity = silent
# Add summary to documentation comment
dotnet_diagnostic.RCS1138.severity = silent
# Add summary element to documentation comment
dotnet_diagnostic.RCS1139.severity = silent
# Implement exception constructors
dotnet_diagnostic.RCS1194.severity = silent
# Do not pass non-read-only struct by read-only reference
dotnet_diagnostic.RCS1242.severity = silent
## Microsoft.CodeAnalysis.BannedApiAnalyzers rules
# Do not use banned APIs

View File

@ -41,6 +41,7 @@
<PackageReference Include="Menees.Analyzers" PrivateAssets="all" />
<PackageReference Include="Meziantou.Analyzer" PrivateAssets="all" />
<PackageReference Include="Nullable" PrivateAssets="all" />
<PackageReference Include="Roslynator.Analyzers" PrivateAssets="all" />
<PackageReference Include="StyleCop.Analyzers" PrivateAssets="all" />
<Analyzer Include="$(MSBuildProjectDirectory)/../../References/BizHawk.Analyzer.dll" />
<GlobalAnalyzerConfigFiles Include="$(MSBuildProjectDirectory)/../../.global.editorconfig.ini" />

View File

@ -23,6 +23,7 @@
<PackageVersion Include="Nullable" Version="1.3.1" />
<PackageVersion Include="PolySharp" Version="1.15.0" />
<PackageVersion Include="ppy.SDL2-CS" Version="1.0.630-alpha" /> <!-- last version with .NET Standard 2.0 support -->
<PackageVersion Include="Roslynator.Analyzers" Version="4.12.11" />
<PackageVersion Include="SharpCompress" Version="0.39.0" />
<PackageVersion Include="Silk.NET.OpenAL" Version="2.21.0" />
<PackageVersion Include="Silk.NET.OpenAL.Extensions.Creative" Version="2.21.0" />

View File

@ -5,7 +5,7 @@
<Import Project="../MainSlnCommon.props" />
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>$(NoWarn);BHI1104;CA1806;CA1825;CA2214;MA0060;MA0084;MA0090;MA0140;MEN018;RS0030;SA1100;SA1120;SA1129;SA1137;SA1205;SA1208;SA1400;SA1514;SA1517</NoWarn>
<NoWarn>$(NoWarn);BHI1104;CA1806;CA1825;CA2214;MA0060;MA0084;MA0090;MA0140;MEN018;RCS1215;RS0030;SA1100;SA1120;SA1129;SA1137;SA1205;SA1208;SA1400;SA1514;SA1517</NoWarn>
<Nullable>disable</Nullable>
</PropertyGroup>
<ItemGroup>