From 861adad44eda817e5b5180fe985f4e3507d2e051 Mon Sep 17 00:00:00 2001 From: Brad Wilson Date: Mon, 16 Dec 2024 12:06:02 -0800 Subject: [PATCH] Latest dependencies --- src/Directory.Build.props | 10 ++++---- ...taRowArgumentsShouldBeSerializableTests.cs | 7 ++++-- ...aTypeArgumentsShouldBeSerializableTests.cs | 7 ++++-- ...ssMustHaveParameterlessConstructorTests.cs | 6 ++++- ...tHaveParameterlessConstructorFixerTests.cs | 24 +++++++++++++++---- .../Utility/CodeAnalyzerHelper.cs | 12 +++++----- .../xunit.analyzers.tests.csproj | 10 ++++---- tools/builder/build.csproj | 2 +- tools/builder/models/BuildContext.cs | 2 +- 9 files changed, 53 insertions(+), 27 deletions(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 1b1964a4..a0096eb9 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -32,7 +32,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all @@ -75,12 +75,12 @@ - + - - - + + + diff --git a/src/xunit.analyzers.tests/Analyzers/X1000/TheoryDataRowArgumentsShouldBeSerializableTests.cs b/src/xunit.analyzers.tests/Analyzers/X1000/TheoryDataRowArgumentsShouldBeSerializableTests.cs index 6f6c9d0e..a502c234 100644 --- a/src/xunit.analyzers.tests/Analyzers/X1000/TheoryDataRowArgumentsShouldBeSerializableTests.cs +++ b/src/xunit.analyzers.tests/Analyzers/X1000/TheoryDataRowArgumentsShouldBeSerializableTests.cs @@ -156,8 +156,11 @@ public class CustomSerializer : IXunitSerializer {{ public object Deserialize(Type type, string serializedValue) => throw new NotImplementedException(); - public bool IsSerializable(Type type, object? value) => - true; + public bool IsSerializable(Type type, object? value, out string? failureReason) + {{ + failureReason = null; + return true; + }} public string Serialize(object value) => throw new NotImplementedException(); diff --git a/src/xunit.analyzers.tests/Analyzers/X1000/TheoryDataTypeArgumentsShouldBeSerializableTests.cs b/src/xunit.analyzers.tests/Analyzers/X1000/TheoryDataTypeArgumentsShouldBeSerializableTests.cs index 0d19ad0e..1167a017 100644 --- a/src/xunit.analyzers.tests/Analyzers/X1000/TheoryDataTypeArgumentsShouldBeSerializableTests.cs +++ b/src/xunit.analyzers.tests/Analyzers/X1000/TheoryDataTypeArgumentsShouldBeSerializableTests.cs @@ -288,8 +288,11 @@ public class CustomSerializer : IXunitSerializer {{ public object Deserialize(Type type, string serializedValue) => throw new NotImplementedException(); - public bool IsSerializable(Type type, object? value) => - true; + public bool IsSerializable(Type type, object? value, out string? failureReason) + {{ + failureReason = null; + return true; + }} public string Serialize(object value) => throw new NotImplementedException(); diff --git a/src/xunit.analyzers.tests/Analyzers/X3000/SerializableClassMustHaveParameterlessConstructorTests.cs b/src/xunit.analyzers.tests/Analyzers/X3000/SerializableClassMustHaveParameterlessConstructorTests.cs index 886fd5e9..7cd67f6d 100644 --- a/src/xunit.analyzers.tests/Analyzers/X3000/SerializableClassMustHaveParameterlessConstructorTests.cs +++ b/src/xunit.analyzers.tests/Analyzers/X3000/SerializableClassMustHaveParameterlessConstructorTests.cs @@ -182,7 +182,11 @@ public class {{|#0:MySerializer|}} : IXunitSerializer {0} public object Deserialize(Type type, string serializedValue) => null!; - public bool IsSerializable(Type type, object? value) => true; + public bool IsSerializable(Type type, object? value, out string? failureReason) + {{ + failureReason = null; + return true; + }} public string Serialize(object value) => string.Empty; }} """; diff --git a/src/xunit.analyzers.tests/Fixes/X3000/SerializableClassMustHaveParameterlessConstructorFixerTests.cs b/src/xunit.analyzers.tests/Fixes/X3000/SerializableClassMustHaveParameterlessConstructorFixerTests.cs index eddb9f9c..42187eb8 100644 --- a/src/xunit.analyzers.tests/Fixes/X3000/SerializableClassMustHaveParameterlessConstructorFixerTests.cs +++ b/src/xunit.analyzers.tests/Fixes/X3000/SerializableClassMustHaveParameterlessConstructorFixerTests.cs @@ -336,7 +336,11 @@ public class [|MySerializer|] : IXunitSerializer public MySerializer(int _) { } public object Deserialize(Type type, string serializedValue) => null!; - public bool IsSerializable(Type type, object? value) => true; + public bool IsSerializable(Type type, object? value, out string? failureReason) + { + failureReason = null; + return true; + } public string Serialize(object value) => string.Empty; } """; @@ -353,7 +357,11 @@ public MySerializer() public MySerializer(int _) { } public object Deserialize(Type type, string serializedValue) => null!; - public bool IsSerializable(Type type, object? value) => true; + public bool IsSerializable(Type type, object? value, out string? failureReason) + { + failureReason = null; + return true; + } public string Serialize(object value) => string.Empty; } """; @@ -373,7 +381,11 @@ public class [|MySerializer|] : IXunitSerializer protected MySerializer() { } public object Deserialize(Type type, string serializedValue) => null!; - public bool IsSerializable(Type type, object? value) => true; + public bool IsSerializable(Type type, object? value, out string? failureReason) + { + failureReason = null; + return true; + } public string Serialize(object value) => string.Empty; } """; @@ -386,7 +398,11 @@ public class MySerializer : IXunitSerializer public MySerializer() { } public object Deserialize(Type type, string serializedValue) => null!; - public bool IsSerializable(Type type, object? value) => true; + public bool IsSerializable(Type type, object? value, out string? failureReason) + { + failureReason = null; + return true; + } public string Serialize(object value) => string.Empty; } """; diff --git a/src/xunit.analyzers.tests/Utility/CodeAnalyzerHelper.cs b/src/xunit.analyzers.tests/Utility/CodeAnalyzerHelper.cs index 1368946f..aa20cd4e 100644 --- a/src/xunit.analyzers.tests/Utility/CodeAnalyzerHelper.cs +++ b/src/xunit.analyzers.tests/Utility/CodeAnalyzerHelper.cs @@ -61,10 +61,10 @@ static CodeAnalyzerHelper() new PackageIdentity("Microsoft.Extensions.Primitives", "8.0.0"), new PackageIdentity("System.Threading.Tasks.Extensions", "4.5.4"), new PackageIdentity("System.Text.Json", "8.0.0"), - new PackageIdentity("xunit.v3.assert", "0.6.0-pre.9"), - new PackageIdentity("xunit.v3.common", "0.6.0-pre.9"), - new PackageIdentity("xunit.v3.extensibility.core", "0.6.0-pre.9"), - new PackageIdentity("xunit.v3.runner.common", "0.6.0-pre.9") + new PackageIdentity("xunit.v3.assert", "1.0.0"), + new PackageIdentity("xunit.v3.common", "1.0.0"), + new PackageIdentity("xunit.v3.extensibility.core", "1.0.0"), + new PackageIdentity("xunit.v3.runner.common", "1.0.0") ) ); @@ -74,8 +74,8 @@ static CodeAnalyzerHelper() new PackageIdentity("Microsoft.Extensions.Primitives", "8.0.0"), new PackageIdentity("System.Threading.Tasks.Extensions", "4.5.4"), new PackageIdentity("System.Text.Json", "8.0.0"), - new PackageIdentity("xunit.v3.common", "0.6.0-pre.9"), - new PackageIdentity("xunit.v3.runner.utility", "0.6.0-pre.9") + new PackageIdentity("xunit.v3.common", "1.0.0"), + new PackageIdentity("xunit.v3.runner.utility", "1.0.0") ) ); } diff --git a/src/xunit.analyzers.tests/xunit.analyzers.tests.csproj b/src/xunit.analyzers.tests/xunit.analyzers.tests.csproj index 07973dc2..a2aff0b2 100644 --- a/src/xunit.analyzers.tests/xunit.analyzers.tests.csproj +++ b/src/xunit.analyzers.tests/xunit.analyzers.tests.csproj @@ -28,11 +28,11 @@ - - - - - + + + + + diff --git a/tools/builder/build.csproj b/tools/builder/build.csproj index d8780257..ccc4c8e5 100644 --- a/tools/builder/build.csproj +++ b/tools/builder/build.csproj @@ -16,7 +16,7 @@ - + diff --git a/tools/builder/models/BuildContext.cs b/tools/builder/models/BuildContext.cs index 4fe9e60e..25c96aec 100644 --- a/tools/builder/models/BuildContext.cs +++ b/tools/builder/models/BuildContext.cs @@ -16,7 +16,7 @@ public partial IReadOnlyList GetSkippedAnalysisFolders() => partial void Initialize() { - consoleRunner = Path.Combine(NuGetPackageCachePath, "xunit.v3.runner.console", "0.6.0-pre.9", "tools", "net472", "xunit.v3.runner.console.exe"); + consoleRunner = Path.Combine(NuGetPackageCachePath, "xunit.v3.runner.console", "1.0.0", "tools", "net472", "xunit.v3.runner.console.exe"); if (!File.Exists(consoleRunner)) throw new InvalidOperationException($"Cannot find console runner at '{consoleRunner}'"); }