Skip to content

Commit

Permalink
Update StyleCop and other Analyzers
Browse files Browse the repository at this point in the history
  • Loading branch information
YoshiRulz committed Jul 3, 2024
1 parent 504ba59 commit c6101a1
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .global.editorconfig.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Expand All @@ -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" />
Expand Down
2 changes: 2 additions & 0 deletions src/BizHawk.Client.Common/cheats/GameSharkDecoder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using BizHawk.Common.StringExtensions;
using BizHawk.Emulation.Common;

#pragma warning disable MA0089
namespace BizHawk.Client.Common.cheats
{
public class GameSharkDecoder
Expand Down Expand Up @@ -143,3 +144,4 @@ private static IDecodeResult Snes(string code)
}
}
}
#pragma warning restore MA0089
2 changes: 2 additions & 0 deletions src/BizHawk.Client.Common/cheats/GbaGameSharkDecoder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Globalization;
using System.Linq;

#pragma warning disable MA0089
namespace BizHawk.Client.Common.cheats
{
// TODO:
Expand Down Expand Up @@ -95,3 +96,4 @@ private static string GetLast(string str, int length)
}
}
}
#pragma warning restore MA0089
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Globalization;

#pragma warning disable MA0089
namespace BizHawk.Client.Common.cheats
{
// TODO: validate string and throw
Expand Down Expand Up @@ -51,3 +52,4 @@ public static IDecodeResult Decode(string code)
}
}
}
#pragma warning restore MA0089
2 changes: 2 additions & 0 deletions src/BizHawk.Client.Common/cheats/GenesisGameGenieDecoder.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;

#pragma warning disable MA0089
namespace BizHawk.Client.Common.cheats
{
public static class GenesisGameGenieDecoder
Expand Down Expand Up @@ -85,3 +86,4 @@ public static IDecodeResult Decode(string code)
}
}
}
#pragma warning restore MA0089
2 changes: 2 additions & 0 deletions src/BizHawk.Client.Common/cheats/N64GameSharkDecoder.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Globalization;

#pragma warning disable MA0089
namespace BizHawk.Client.Common.cheats
{
// TODO: support comparison cheat codes
Expand Down Expand Up @@ -66,3 +67,4 @@ public static IDecodeResult Decode(string code)
}
}
}
#pragma warning restore MA0089
2 changes: 2 additions & 0 deletions src/BizHawk.Client.Common/cheats/PsxGameSharkDecoder.cs
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -57,3 +58,4 @@ public static IDecodeResult Decode(string code)
}
}
}
#pragma warning restore MA0089
2 changes: 2 additions & 0 deletions src/BizHawk.Client.Common/cheats/SaturnGameSharkDecoder.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Globalization;

#pragma warning disable MA0089
namespace BizHawk.Client.Common.cheats
{
public static class SaturnGameSharkDecoder
Expand Down Expand Up @@ -44,3 +45,4 @@ public static IDecodeResult Decode(string code)
}
}
}
#pragma warning restore MA0089
2 changes: 2 additions & 0 deletions src/BizHawk.Client.Common/cheats/SmsActionReplayDecoder.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Globalization;

#pragma warning disable MA0089
namespace BizHawk.Client.Common.cheats
{
public static class SmsActionReplayDecoder
Expand Down Expand Up @@ -28,3 +29,4 @@ public static IDecodeResult Decode(string code)
}
}
}
#pragma warning restore MA0089
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ protected void InternalDoRequest(LibRCheevos.rc_error_t apiParamsResult, ref Lib
? 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
Expand Down

0 comments on commit c6101a1

Please sign in to comment.