diff --git a/.global.editorconfig.ini b/.global.editorconfig.ini index 6872186a44..d82a1320cf 100644 --- a/.global.editorconfig.ini +++ b/.global.editorconfig.ini @@ -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 diff --git a/Directory.Packages.props b/Directory.Packages.props index e4a0c19657..72e8d41674 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -6,8 +6,8 @@ - - + + @@ -28,7 +28,7 @@ - + diff --git a/src/BizHawk.Client.Common/cheats/GameSharkDecoder.cs b/src/BizHawk.Client.Common/cheats/GameSharkDecoder.cs index bf07a1e71f..225428709d 100644 --- a/src/BizHawk.Client.Common/cheats/GameSharkDecoder.cs +++ b/src/BizHawk.Client.Common/cheats/GameSharkDecoder.cs @@ -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 diff --git a/src/BizHawk.Client.Common/cheats/GbaGameSharkDecoder.cs b/src/BizHawk.Client.Common/cheats/GbaGameSharkDecoder.cs index 6b94b732f9..e1e28d7a77 100644 --- a/src/BizHawk.Client.Common/cheats/GbaGameSharkDecoder.cs +++ b/src/BizHawk.Client.Common/cheats/GbaGameSharkDecoder.cs @@ -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 diff --git a/src/BizHawk.Client.Common/cheats/GenesisActionReplayDecoder.cs b/src/BizHawk.Client.Common/cheats/GenesisActionReplayDecoder.cs index ee61b0a935..094a8befa4 100644 --- a/src/BizHawk.Client.Common/cheats/GenesisActionReplayDecoder.cs +++ b/src/BizHawk.Client.Common/cheats/GenesisActionReplayDecoder.cs @@ -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 diff --git a/src/BizHawk.Client.Common/cheats/GenesisGameGenieDecoder.cs b/src/BizHawk.Client.Common/cheats/GenesisGameGenieDecoder.cs index 290db9c097..c377b5f526 100644 --- a/src/BizHawk.Client.Common/cheats/GenesisGameGenieDecoder.cs +++ b/src/BizHawk.Client.Common/cheats/GenesisGameGenieDecoder.cs @@ -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 diff --git a/src/BizHawk.Client.Common/cheats/N64GameSharkDecoder.cs b/src/BizHawk.Client.Common/cheats/N64GameSharkDecoder.cs index 2d42fcc523..288b84e8cd 100644 --- a/src/BizHawk.Client.Common/cheats/N64GameSharkDecoder.cs +++ b/src/BizHawk.Client.Common/cheats/N64GameSharkDecoder.cs @@ -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 diff --git a/src/BizHawk.Client.Common/cheats/PsxGameSharkDecoder.cs b/src/BizHawk.Client.Common/cheats/PsxGameSharkDecoder.cs index 3298a37227..b755b05bd8 100644 --- a/src/BizHawk.Client.Common/cheats/PsxGameSharkDecoder.cs +++ b/src/BizHawk.Client.Common/cheats/PsxGameSharkDecoder.cs @@ -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 diff --git a/src/BizHawk.Client.Common/cheats/SaturnGameSharkDecoder.cs b/src/BizHawk.Client.Common/cheats/SaturnGameSharkDecoder.cs index 06fd435547..bcd644d1a0 100644 --- a/src/BizHawk.Client.Common/cheats/SaturnGameSharkDecoder.cs +++ b/src/BizHawk.Client.Common/cheats/SaturnGameSharkDecoder.cs @@ -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 diff --git a/src/BizHawk.Client.Common/cheats/SmsActionReplayDecoder.cs b/src/BizHawk.Client.Common/cheats/SmsActionReplayDecoder.cs index c3ef9867a5..d2be09701e 100644 --- a/src/BizHawk.Client.Common/cheats/SmsActionReplayDecoder.cs +++ b/src/BizHawk.Client.Common/cheats/SmsActionReplayDecoder.cs @@ -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 diff --git a/src/BizHawk.Client.EmuHawk/RetroAchievements/RCheevos.Http.cs b/src/BizHawk.Client.EmuHawk/RetroAchievements/RCheevos.Http.cs index b0ee101a5c..e9bcde5dc9 100644 --- a/src/BizHawk.Client.EmuHawk/RetroAchievements/RCheevos.Http.cs +++ b/src/BizHawk.Client.EmuHawk/RetroAchievements/RCheevos.Http.cs @@ -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