Update StyleCop and other Analyzers

This commit is contained in:
YoshiRulz 2024-07-03 19:18:03 +10:00
parent 504ba590b1
commit c6101a190e
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
11 changed files with 22 additions and 4 deletions

View File

@ -320,6 +320,8 @@ dotnet_diagnostic.MA0108.severity = error
dotnet_diagnostic.MA0109.severity = silent
# Use the Regex source generator
dotnet_diagnostic.MA0110.severity = error
# Both if and else branch have identical code
dotnet_diagnostic.MA0140.severity = silent
## Menees.Analyzers rules

View File

@ -6,8 +6,8 @@
<PackageVersion Include="ImGui.NET" Version="1.90.6.1" />
<PackageVersion Include="JunitXml.TestLogger" Version="3.1.12" />
<PackageVersion Include="Magick.NET-Q8-AnyCPU" Version="13.9.0" />
<PackageVersion Include="Menees.Analyzers" Version="3.0.10" />
<PackageVersion Include="Meziantou.Analyzer" Version="2.0.33" />
<PackageVersion Include="Menees.Analyzers" Version="3.2.2" />
<PackageVersion Include="Meziantou.Analyzer" Version="2.0.159" />
<PackageVersion Include="Microsoft.Bcl.HashCode" Version="1.1.1" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.8.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.8.0" />
@ -28,7 +28,7 @@
<PackageVersion Include="Silk.NET.OpenGL" Version="2.21.0" />
<PackageVersion Include="Silk.NET.WGL.Extensions.NV" Version="2.21.0" />
<PackageVersion Include="SQLitePCLRaw.provider.e_sqlite3" Version="2.1.8" />
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.435" /><!-- don't forget to update .stylecop.json at the same time -->
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.556" /><!-- don't forget to update .stylecop.json at the same time -->
<PackageVersion Include="System.Collections.Immutable" Version="8.0.0" />
<PackageVersion Include="System.ComponentModel.Annotations" Version="5.0.0" />
<PackageVersion Include="System.Drawing.Common" Version="6.0.0" />

View File

@ -2,6 +2,7 @@
using BizHawk.Common.StringExtensions;
using BizHawk.Emulation.Common;
#pragma warning disable MA0089
namespace BizHawk.Client.Common.cheats
{
public class GameSharkDecoder
@ -143,3 +144,4 @@ namespace BizHawk.Client.Common.cheats
}
}
}
#pragma warning restore MA0089

View File

@ -2,6 +2,7 @@
using System.Globalization;
using System.Linq;
#pragma warning disable MA0089
namespace BizHawk.Client.Common.cheats
{
// TODO:
@ -95,3 +96,4 @@ namespace BizHawk.Client.Common.cheats
}
}
}
#pragma warning restore MA0089

View File

@ -1,6 +1,7 @@
using System;
using System.Globalization;
#pragma warning disable MA0089
namespace BizHawk.Client.Common.cheats
{
// TODO: validate string and throw
@ -51,3 +52,4 @@ namespace BizHawk.Client.Common.cheats
}
}
}
#pragma warning restore MA0089

View File

@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
#pragma warning disable MA0089
namespace BizHawk.Client.Common.cheats
{
public static class GenesisGameGenieDecoder
@ -85,3 +86,4 @@ namespace BizHawk.Client.Common.cheats
}
}
}
#pragma warning restore MA0089

View File

@ -1,6 +1,7 @@
using System;
using System.Globalization;
#pragma warning disable MA0089
namespace BizHawk.Client.Common.cheats
{
// TODO: support comparison cheat codes
@ -66,3 +67,4 @@ namespace BizHawk.Client.Common.cheats
}
}
}
#pragma warning restore MA0089

View File

@ -1,6 +1,7 @@
using System;
using System.Globalization;
#pragma warning disable MA0089
namespace BizHawk.Client.Common.cheats
{
// TODO: cheats support comparison type, so we could support a lot more codes, by having Compare and Type properties and parsing
@ -57,3 +58,4 @@ namespace BizHawk.Client.Common.cheats
}
}
}
#pragma warning restore MA0089

View File

@ -1,6 +1,7 @@
using System;
using System.Globalization;
#pragma warning disable MA0089
namespace BizHawk.Client.Common.cheats
{
public static class SaturnGameSharkDecoder
@ -44,3 +45,4 @@ namespace BizHawk.Client.Common.cheats
}
}
}
#pragma warning restore MA0089

View File

@ -1,6 +1,7 @@
using System;
using System.Globalization;
#pragma warning disable MA0089
namespace BizHawk.Client.Common.cheats
{
public static class SmsActionReplayDecoder
@ -28,3 +29,4 @@ namespace BizHawk.Client.Common.cheats
}
}
}
#pragma warning restore MA0089

View File

@ -112,7 +112,7 @@ namespace BizHawk.Client.EmuHawk
? HttpPost(request.URL, request.PostData, request.ContentType)
: HttpGet(request.URL);
apiTask.ContinueWith(async t =>
_ = apiTask.ContinueWith(async t =>
{
var result = await t;
if (result is null) // likely a timeout