Skip to content

Commit

Permalink
housekeeping
Browse files Browse the repository at this point in the history
  • Loading branch information
pardeike committed Apr 4, 2024
1 parent f608054 commit b2d174a
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 17 deletions.
1 change: 1 addition & 0 deletions Harmony/Documentation/GlobalSuppressions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@
[assembly: SuppressMessage("Performance", "CA1806")]
[assembly: SuppressMessage("Performance", "CA1859")]

[assembly: SuppressMessage("", "CA1016")]
[assembly: SuppressMessage("", "CS0649")]
[assembly: SuppressMessage("", "IDE0251")]
2 changes: 0 additions & 2 deletions Harmony/Tools/AccessTools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
using System.Reflection;
using System.Reflection.Emit;
using System.Threading;


#if NET45_OR_GREATER || NETSTANDARD || NETCOREAPP
using System.Runtime.CompilerServices;
#endif
Expand Down
1 change: 1 addition & 0 deletions HarmonyTests/GlobalSuppressions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
[assembly: SuppressMessage("Design", "CA1034")]
[assembly: SuppressMessage("Design", "CA1052")]

[assembly: SuppressMessage("", "CA1016")]
[assembly: SuppressMessage("", "CS0169")]
[assembly: SuppressMessage("", "CA1401")]

Expand Down
4 changes: 2 additions & 2 deletions HarmonyTests/HarmonyTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand All @@ -65,7 +65,7 @@
</ItemGroup>

<ItemGroup Condition="'$(TargetFrameworkIdentifier)'=='.NETCoreApp'">
<PackageReference Include="Lokad.ILPack" Version="0.1.4" PrivateAssets="all" />
<PackageReference Include="Lokad.ILPack" Version="0.1.7" PrivateAssets="all" />
</ItemGroup>

<Target Name="ChangeAliasesOfStrongNameAssemblies" BeforeTargets="FindReferenceAssembliesForReferences;ResolveReferences">
Expand Down
4 changes: 1 addition & 3 deletions HarmonyTests/Patching/FinalizerPatches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Security.Cryptography.X509Certificates;
using System.Text;

namespace HarmonyLibTests.Patching
Expand All @@ -22,7 +20,7 @@ public void Test_FinalizerPatchOrder()
harmony.PatchCategory("finalizer-test");
try
{
_ = progress.Clear();
progress = new();
Class.Test();
Assert.Fail("Should throw an exception");
}
Expand Down
4 changes: 2 additions & 2 deletions HarmonyTests/Patching/Specials.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public void Test_PatchResultRef()
Assert.AreEqual(new[] { 1, 0 }, ResultRefStruct.numbersPrefix);
Assert.AreEqual(new[] { 2, 0 }, ResultRefStruct.numbersPostfix);
Assert.AreEqual(new[] { 3 }, ResultRefStruct.numbersPostfixWithNull);
Assert.Throws<Exception>(() => test.ToFinalizer(), "ToFinalizer method does not throw");
_ = Assert.Throws<Exception>(() => test.ToFinalizer(), "ToFinalizer method does not throw");
Assert.AreEqual(new[] { 5, 0 }, ResultRefStruct.numbersMixed);

var replacements = processor.Patch();
Expand Down Expand Up @@ -255,7 +255,7 @@ public void Test_PatchException()
);
DeadEndCode_Patch1.prefixCalled = false;
DeadEndCode_Patch1.postfixCalled = false;
test.Method();
_ = test.Method();
Assert.True(DeadEndCode_Patch1.prefixCalled);
Assert.True(DeadEndCode_Patch1.postfixCalled);
}
Expand Down
1 change: 0 additions & 1 deletion HarmonyTests/Patching/Transpiling.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using HarmonyLib;
using HarmonyLibTests.Assets;
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection.Emit;
Expand Down
1 change: 0 additions & 1 deletion HarmonyTests/Tools/Assets/AttributesClass.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using HarmonyLib;
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;

Expand Down
5 changes: 0 additions & 5 deletions HarmonyTests/Tools/Assets/CodeMatcherClass.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HarmonyTests.Tools.Assets
{
public class CodeMatcherClass
Expand Down
4 changes: 3 additions & 1 deletion HarmonyTests/Tools/TestAccessTools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using static HarmonyLibTests.Assets.AccessToolsMethodDelegate;
#if NETCOREAPP
using System.Linq;
#endif

namespace HarmonyLibTests.Tools
{
Expand Down

0 comments on commit b2d174a

Please sign in to comment.