Enable MA0140 and fix noncompliance (except in Cores)

"Both if and else branch have identical code"
see 618951403
This commit is contained in:
YoshiRulz 2024-07-03 21:01:05 +10:00
parent c188feb50c
commit db2782ca1b
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
3 changed files with 4 additions and 7 deletions

View File

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

View File

@ -169,15 +169,12 @@ namespace BizHawk.Client.EmuHawk
*/ */
var dearchivalMethod = SharpCompressDearchivalMethod.Instance; var dearchivalMethod = SharpCompressDearchivalMethod.Instance;
#if false // making this run always to restore the default behavior where unrecognized files are treated like roms --adelikat
if (string.IsNullOrEmpty(archive) && dearchivalMethod.CheckSignature(file, out _, out _)) if (string.IsNullOrEmpty(archive) && dearchivalMethod.CheckSignature(file, out _, out _))
#endif
{ {
sortedFiles[LoadOrdering.Rom].Add(fileInformation); sortedFiles[LoadOrdering.Rom].Add(fileInformation);
} }
else
{
// This is hack is to ensure that unrecognized files are treated like ROMs
sortedFiles[LoadOrdering.Rom].Add(fileInformation);
}
#if false #if false
/* /*

View File

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