diff --git a/Common.props b/Common.props index ae7126afec..e95792861b 100644 --- a/Common.props +++ b/Common.props @@ -32,8 +32,8 @@ - - + + @@ -43,7 +43,7 @@ true - - + + diff --git a/Common.ruleset b/Common.ruleset index c163bab2b8..f2f168e4ed 100644 --- a/Common.ruleset +++ b/Common.ruleset @@ -183,7 +183,7 @@ - + diff --git a/ExternalProjects/AnalyzersCommon.props b/ExternalProjects/AnalyzersCommon.props index b54bb5443c..612a6e54d9 100644 --- a/ExternalProjects/AnalyzersCommon.props +++ b/ExternalProjects/AnalyzersCommon.props @@ -8,9 +8,13 @@ Yes, even with an EXPLICIT to the Common project's assembly. So you get this instead. —yoshi --> + + true + $(NoWarn);RS2008 + - - + + diff --git a/ExternalProjects/BizHawk.Analyzer/FirstOrDefaultOnStructAnalyzer.cs b/ExternalProjects/BizHawk.Analyzer/FirstOrDefaultOnStructAnalyzer.cs index e68f46f01e..ae888bb3a1 100644 --- a/ExternalProjects/BizHawk.Analyzer/FirstOrDefaultOnStructAnalyzer.cs +++ b/ExternalProjects/BizHawk.Analyzer/FirstOrDefaultOnStructAnalyzer.cs @@ -42,7 +42,7 @@ public sealed class FirstOrDefaultOnStructAnalyzer : DiagnosticAnalyzer var operation = (IInvocationOperation) oac.Operation; var calledSym = operation.TargetMethod.ConstructedFrom; if (!(firstOrDefaultWithPredSym!.Matches(calledSym) || firstOrDefaultNoPredSym!.Matches(calledSym))) return; - var receiverExprType = (INamedTypeSymbol) operation.SemanticModel.GetTypeInfo((CSharpSyntaxNode) operation.Arguments[0].Syntax)!.ConvertedType!; + var receiverExprType = (INamedTypeSymbol) operation.SemanticModel!.GetTypeInfo((CSharpSyntaxNode) operation.Arguments[0].Syntax)!.ConvertedType!; if (receiverExprType.TypeArguments[0].IsValueType) oac.ReportDiagnostic(Diagnostic.Create(DiagUseFirstOrNull, operation.Syntax.GetLocation())); }, OperationKind.Invocation); diff --git a/ExternalProjects/BizHawk.Analyzer/UseTypeofOperatorAnalyzer.cs b/ExternalProjects/BizHawk.Analyzer/UseTypeofOperatorAnalyzer.cs index 93ed858abd..049364a2d3 100644 --- a/ExternalProjects/BizHawk.Analyzer/UseTypeofOperatorAnalyzer.cs +++ b/ExternalProjects/BizHawk.Analyzer/UseTypeofOperatorAnalyzer.cs @@ -42,7 +42,7 @@ public sealed class UseTypeofOperatorAnalyzer : DiagnosticAnalyzer objectDotGetTypeSym ??= oac.Compilation.GetTypeByMetadataName("System.Object")!.GetMembers("GetType")[0]; if (!objectDotGetTypeSym.Matches(operation.TargetMethod)) return; if (operation.Instance.Syntax is not ThisExpressionSyntax and not IdentifierNameSyntax { Identifier.Text: "GetType" }) return; // called on something that isn't `this` - var enclosingType = operation.SemanticModel.GetDeclaredSymbol(((CSharpSyntaxNode) operation.Syntax).EnclosingTypeDeclarationSyntax()!)!; + var enclosingType = operation.SemanticModel!.GetDeclaredSymbol(((CSharpSyntaxNode) operation.Syntax).EnclosingTypeDeclarationSyntax()!)!; oac.ReportDiagnostic(Diagnostic.Create(enclosingType.IsSealed ? DiagNoGetTypeOnThisSealed : DiagNoGetTypeOnThis, operation.Syntax.GetLocation(), enclosingType.Name)); }, OperationKind.Invocation); diff --git a/ExternalProjects/PcxFileTypePlugin.HawkQuantizer/PcxFileTypePlugin.HawkQuantizer.csproj b/ExternalProjects/PcxFileTypePlugin.HawkQuantizer/PcxFileTypePlugin.HawkQuantizer.csproj index 2c9d7a89a5..6230731e26 100644 --- a/ExternalProjects/PcxFileTypePlugin.HawkQuantizer/PcxFileTypePlugin.HawkQuantizer.csproj +++ b/ExternalProjects/PcxFileTypePlugin.HawkQuantizer/PcxFileTypePlugin.HawkQuantizer.csproj @@ -8,6 +8,6 @@ disable - + diff --git a/ExternalToolProjects/DATParser/DATParser.csproj b/ExternalToolProjects/DATParser/DATParser.csproj index a09d32549c..ef15841bf6 100644 --- a/ExternalToolProjects/DATParser/DATParser.csproj +++ b/ExternalToolProjects/DATParser/DATParser.csproj @@ -7,7 +7,7 @@ true - + diff --git a/ExternalToolProjects/DBMan/DBMan.csproj b/ExternalToolProjects/DBMan/DBMan.csproj index 32c3741ee7..f386d85a4b 100644 --- a/ExternalToolProjects/DBMan/DBMan.csproj +++ b/ExternalToolProjects/DBMan/DBMan.csproj @@ -8,7 +8,7 @@ $(NoWarn);MSB3270;SA1400 - + diff --git a/ExternalToolProjects/NET48ExternalToolForm.targets b/ExternalToolProjects/NET48ExternalToolForm.targets index 8b8cfc1d6c..18f23f72f5 100644 --- a/ExternalToolProjects/NET48ExternalToolForm.targets +++ b/ExternalToolProjects/NET48ExternalToolForm.targets @@ -7,7 +7,7 @@ - + diff --git a/References/BizHawk.Analyzer.dll b/References/BizHawk.Analyzer.dll index e59efe202e..59b663b8c3 100644 Binary files a/References/BizHawk.Analyzer.dll and b/References/BizHawk.Analyzer.dll differ diff --git a/References/BizHawk.SrcGen.ReflectionCache.dll b/References/BizHawk.SrcGen.ReflectionCache.dll index e9bfec5bcb..921544ba31 100644 Binary files a/References/BizHawk.SrcGen.ReflectionCache.dll and b/References/BizHawk.SrcGen.ReflectionCache.dll differ diff --git a/References/BizHawk.SrcGen.VersionInfo.dll b/References/BizHawk.SrcGen.VersionInfo.dll index 9804e928d3..9934224fff 100644 Binary files a/References/BizHawk.SrcGen.VersionInfo.dll and b/References/BizHawk.SrcGen.VersionInfo.dll differ diff --git a/References/FlatBuffers.GenOutput.dll b/References/FlatBuffers.GenOutput.dll index 9b9e3a781c..22bf5437d4 100644 Binary files a/References/FlatBuffers.GenOutput.dll and b/References/FlatBuffers.GenOutput.dll differ diff --git a/References/ISOParser.dll b/References/ISOParser.dll index 75c27f3e90..46570e94af 100644 Binary files a/References/ISOParser.dll and b/References/ISOParser.dll differ diff --git a/References/NLua.dll b/References/NLua.dll index 697c105045..578d1b011b 100644 Binary files a/References/NLua.dll and b/References/NLua.dll differ diff --git a/References/PcxFileTypePlugin.HawkQuantizer.dll b/References/PcxFileTypePlugin.HawkQuantizer.dll index 9be688f706..5c7886ebbd 100644 Binary files a/References/PcxFileTypePlugin.HawkQuantizer.dll and b/References/PcxFileTypePlugin.HawkQuantizer.dll differ diff --git a/src/BizHawk.Bizware.BizwareGL/BizHawk.Bizware.BizwareGL.csproj b/src/BizHawk.Bizware.BizwareGL/BizHawk.Bizware.BizwareGL.csproj index ffab7f9435..8f4652c72f 100644 --- a/src/BizHawk.Bizware.BizwareGL/BizHawk.Bizware.BizwareGL.csproj +++ b/src/BizHawk.Bizware.BizwareGL/BizHawk.Bizware.BizwareGL.csproj @@ -8,8 +8,8 @@ disable - - + + diff --git a/src/BizHawk.Client.Common/BizHawk.Client.Common.csproj b/src/BizHawk.Client.Common/BizHawk.Client.Common.csproj index 33131ec100..12c5cc45b9 100644 --- a/src/BizHawk.Client.Common/BizHawk.Client.Common.csproj +++ b/src/BizHawk.Client.Common/BizHawk.Client.Common.csproj @@ -10,7 +10,7 @@ - + diff --git a/src/BizHawk.Common/BizHawk.Common.csproj b/src/BizHawk.Common/BizHawk.Common.csproj index 84632409d0..ded33e3352 100644 --- a/src/BizHawk.Common/BizHawk.Common.csproj +++ b/src/BizHawk.Common/BizHawk.Common.csproj @@ -9,9 +9,9 @@ - + - + diff --git a/src/BizHawk.Emulation.Common/BizHawk.Emulation.Common.csproj b/src/BizHawk.Emulation.Common/BizHawk.Emulation.Common.csproj index d7574925ad..3fcc3e2e4f 100644 --- a/src/BizHawk.Emulation.Common/BizHawk.Emulation.Common.csproj +++ b/src/BizHawk.Emulation.Common/BizHawk.Emulation.Common.csproj @@ -7,8 +7,8 @@ true - - + + diff --git a/src/BizHawk.Tests.Testroms.GB.GambatteSuite/BizHawk.Tests.Testroms.GB.GambatteSuite.csproj b/src/BizHawk.Tests.Testroms.GB.GambatteSuite/BizHawk.Tests.Testroms.GB.GambatteSuite.csproj index 445ba22b97..50ab5f4729 100644 --- a/src/BizHawk.Tests.Testroms.GB.GambatteSuite/BizHawk.Tests.Testroms.GB.GambatteSuite.csproj +++ b/src/BizHawk.Tests.Testroms.GB.GambatteSuite/BizHawk.Tests.Testroms.GB.GambatteSuite.csproj @@ -7,7 +7,7 @@ $(ProjectDir)../../test_output - + diff --git a/src/BizHawk.Tests.Testroms.GB/BizHawk.Tests.Testroms.GB.csproj b/src/BizHawk.Tests.Testroms.GB/BizHawk.Tests.Testroms.GB.csproj index 2fccf3b6b1..5ae245af09 100644 --- a/src/BizHawk.Tests.Testroms.GB/BizHawk.Tests.Testroms.GB.csproj +++ b/src/BizHawk.Tests.Testroms.GB/BizHawk.Tests.Testroms.GB.csproj @@ -17,11 +17,11 @@ - - - - - + + + + + diff --git a/src/BizHawk.Tests/BizHawk.Tests.csproj b/src/BizHawk.Tests/BizHawk.Tests.csproj index e8cde53162..c21515c4d8 100644 --- a/src/BizHawk.Tests/BizHawk.Tests.csproj +++ b/src/BizHawk.Tests/BizHawk.Tests.csproj @@ -11,10 +11,10 @@ $(ProjectDir)../../test_output - - - - + + + + diff --git a/src/BizHawk.Tests/Client.Common/cheats/CheatDecoderTests.cs b/src/BizHawk.Tests/Client.Common/cheats/CheatDecoderTests.cs index 16ce11f286..a1829642a4 100644 --- a/src/BizHawk.Tests/Client.Common/cheats/CheatDecoderTests.cs +++ b/src/BizHawk.Tests/Client.Common/cheats/CheatDecoderTests.cs @@ -22,7 +22,7 @@ namespace BizHawk.Tests.Client.Common.cheats public IEnumerable GetData(MethodInfo methodInfo) => GenerateNonsense ? NonsenseData : RealData; - public string GetDisplayName(MethodInfo methodInfo, object?[] data) + public string? GetDisplayName(MethodInfo methodInfo, object?[]? data) { static string Format(object? o) => o switch { @@ -31,7 +31,7 @@ namespace BizHawk.Tests.Client.Common.cheats string s => $"\"{s}\"", _ => o.ToString()! }; - return $"{methodInfo.Name}({string.Join(", ", data.Select(Format))})"; + return data is null ? null : $"{methodInfo.Name}({string.Join(", ", data.Select(Format))})"; } }