parent
da65ad6226
commit
65ffa3fc2e
|
@ -32,8 +32,8 @@
|
|||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DotNetAnalyzers.DocumentationAnalyzers" Version="1.0.0-beta.59" PrivateAssets="all" />
|
||||
<PackageReference Include="Menees.Analyzers" Version="3.0.8" PrivateAssets="all" />
|
||||
<PackageReference Include="Meziantou.Analyzer" Version="1.0.707" PrivateAssets="all" />
|
||||
<PackageReference Include="Menees.Analyzers" Version="3.0.10" PrivateAssets="all" />
|
||||
<PackageReference Include="Meziantou.Analyzer" Version="2.0.33" PrivateAssets="all" />
|
||||
<PackageReference Include="Nullable" Version="1.3.1" PrivateAssets="all" />
|
||||
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.435" PrivateAssets="all" /><!-- don't forget to update .stylecop.json at the same time -->
|
||||
<Analyzer Include="$(MSBuildProjectDirectory)/../../References/BizHawk.Analyzer.dll" />
|
||||
|
@ -43,7 +43,7 @@
|
|||
<GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition=" $(IsTargetingNetFramework) ">
|
||||
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" PrivateAssets="all" />
|
||||
<PackageReference Include="System.Resources.Extensions" Version="5.0.0" />
|
||||
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="all" />
|
||||
<PackageReference Include="System.Resources.Extensions" Version="7.0.0" PrivateAssets="all" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -183,7 +183,7 @@
|
|||
<Rule Id="MA0019" Action="Error" />
|
||||
|
||||
<!-- Use direct methods instead of LINQ methods -->
|
||||
<Rule Id="MA0020" Action="Error" />
|
||||
<Rule Id="MA0020" Action="Hidden" />
|
||||
|
||||
<!-- Use StringComparer.GetHashCode instead of string.GetHashCode -->
|
||||
<Rule Id="MA0021" Action="Hidden" />
|
||||
|
|
|
@ -8,9 +8,13 @@
|
|||
Yes, even with an EXPLICIT <Reference/> to the Common project's assembly. So you get this instead. —yoshi
|
||||
-->
|
||||
<Import Project="LibCommon.props" />
|
||||
<PropertyGroup>
|
||||
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
|
||||
<NoWarn>$(NoWarn);RS2008</NoWarn>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.2" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.8.0" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.3.0" />
|
||||
<Compile Include="$(MSBuildProjectDirectory)/../AnalyzersCommon/**/*.cs" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -8,6 +8,6 @@
|
|||
<Nullable>disable</Nullable>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Drawing.Common" Version="5.0.3" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="7.0.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Memory" Version="4.5.4" />
|
||||
<PackageReference Include="System.Memory" Version="4.5.5" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Update="CustomMainForm.cs" SubType="Form" />
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<NoWarn>$(NoWarn);MSB3270;SA1400</NoWarn>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Memory" Version="4.5.4" />
|
||||
<PackageReference Include="System.Memory" Version="4.5.5" />
|
||||
<NET48ExternalToolFormDependency Include="$(ProjectDir)CSharp-SQLite.dll" />
|
||||
<Reference Include="CSharp-SQLite" HintPath="$(ProjectDir)CSharp-SQLite.dll" Private="true" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0" />
|
||||
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
|
||||
<Reference Include="BizHawk.Client.Common"
|
||||
HintPath="$(MSBuildProjectDirectory)/../../output/dll/BizHawk.Client.Common.dll"
|
||||
Private="true" />
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -8,8 +8,8 @@
|
|||
<Nullable>disable</Nullable>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Cyotek.Drawing.BitmapFont" Version="2.0.2" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="5.0.3" />
|
||||
<PackageReference Include="Cyotek.Drawing.BitmapFont" Version="2.0.4" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="7.0.0" />
|
||||
<ProjectReference Include="$(ProjectDir)../BizHawk.Common/BizHawk.Common.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<ItemGroup>
|
||||
<Reference Include="System.Data.SQLite, Version=1.0.105.2, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=AMD64" SpecificVersion="False" HintPath="$(ProjectDir)../../References/x64/SQLite/System.Data.SQLite.dll" Private="true" />
|
||||
<Reference Include="NLua, Version=1.4.1.0, Culture=neutral, PublicKeyToken=null, processorArchitecture=MSIL" SpecificVersion="false" HintPath="$(ProjectDir)../../References/NLua.dll" Private="true" />
|
||||
<PackageReference Include="SharpCompress" Version="0.30.1" />
|
||||
<PackageReference Include="SharpCompress" Version="0.31.0" /><!-- can't update any further or .gz stops being detected as archive -->
|
||||
<ProjectReference Include="$(ProjectDir)../BizHawk.Emulation.Cores/BizHawk.Emulation.Cores.csproj" />
|
||||
<ProjectReference Include="$(ProjectDir)../BizHawk.Bizware.BizwareGL/BizHawk.Bizware.BizwareGL.csproj" />
|
||||
<EmbeddedResource Include="Resources/**/*" />
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Bcl.HashCode" Version="1.1.1" />
|
||||
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
|
||||
<PackageReference Include="System.Memory" Version="4.5.4" />
|
||||
<PackageReference Include="System.Memory" Version="4.5.5" />
|
||||
<PackageReference Include="System.Reflection.Emit.Lightweight" Version="4.7.0" PrivateAssets="all" />
|
||||
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0" />
|
||||
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Analyzer Include="$(MSBuildProjectDirectory)/../../References/BizHawk.SrcGen.VersionInfo.dll" />
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Collections.Immutable" Version="5.0.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<PackageReference Include="System.Collections.Immutable" Version="7.0.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<ProjectReference Include="$(ProjectDir)../BizHawk.BizInvoke/BizHawk.BizInvoke.csproj" />
|
||||
<ProjectReference Include="$(ProjectDir)../BizHawk.Common/BizHawk.Common.csproj" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<OutputPath>$(ProjectDir)../../test_output</OutputPath>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" PrivateAssets="all" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" PrivateAssets="all" />
|
||||
<ProjectReference Include="$(ProjectDir)../BizHawk.Tests.Testroms.GB/BizHawk.Tests.Testroms.GB.csproj" />
|
||||
<EmbeddedResource Include="res/**/*" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -17,11 +17,11 @@
|
|||
</PropertyGroup>
|
||||
<!-- BIZHAWKTEST_SAVE_IMAGES=none => no extra defines -->
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" PrivateAssets="all" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="2.2.8" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="2.2.8" />
|
||||
<PackageReference Include="JunitXml.TestLogger" Version="3.0.98" />
|
||||
<PackageReference Include="Magick.NET-Q8-AnyCPU" Version="8.4.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" PrivateAssets="all" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="3.0.2" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="3.0.2" />
|
||||
<PackageReference Include="JunitXml.TestLogger" Version="3.0.124" />
|
||||
<PackageReference Include="Magick.NET-Q8-AnyCPU" Version="13.0.1" />
|
||||
<ProjectReference Include="$(ProjectDir)../BizHawk.Client.Common/BizHawk.Client.Common.csproj" />
|
||||
<EmbeddedResource Include="res/**/*" />
|
||||
<Content Include="$(ProjectDir)../../Assets/gamedb/**/*" LinkBase="gamedb" CopyToOutputDirectory="PreserveNewest" />
|
||||
|
|
|
@ -11,10 +11,10 @@
|
|||
<OutputPath>$(ProjectDir)../../test_output</OutputPath>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" PrivateAssets="all" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="2.2.8" PrivateAssets="all" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="2.2.8" PrivateAssets="all" />
|
||||
<PackageReference Include="JunitXml.TestLogger" Version="3.0.98" PrivateAssets="all" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" PrivateAssets="all" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="3.0.2" PrivateAssets="all" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="3.0.2" PrivateAssets="all" />
|
||||
<PackageReference Include="JunitXml.TestLogger" Version="3.0.124" PrivateAssets="all" />
|
||||
<ProjectReference Include="$(ProjectDir)../BizHawk.Client.Common/BizHawk.Client.Common.csproj" />
|
||||
<Reference Include="NLua, Version=1.4.1.0, Culture=neutral, PublicKeyToken=null, processorArchitecture=MSIL" SpecificVersion="false" HintPath="$(ProjectDir)../../References/NLua.dll" Private="true" />
|
||||
<None Include="$(ProjectDir)../../Assets/dll/lua54.dll" CopyToOutputDirectory="PreserveNewest" />
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace BizHawk.Tests.Client.Common.cheats
|
|||
public IEnumerable<object?[]> 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))})";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue