From d80525dba81c42d7b15a5be76470c280a9c4719a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 1 Sep 2023 19:53:58 +0000 Subject: [PATCH 01/22] chore(deps): update dependency buildalyzer to v5.0.1 (#2665) * chore(deps): update dependency buildalyzer to v5.0.1 * Update package lock files --------- Co-authored-by: Renovatebot --- src/Directory.Packages.props | 2 +- .../Stryker.CLI.UnitTest/packages.lock.json | 14 +++++++------- src/Stryker.CLI/Stryker.CLI/packages.lock.json | 14 +++++++------- .../Stryker.Core.UnitTest/packages.lock.json | 14 +++++++------- src/Stryker.Core/Stryker.Core/packages.lock.json | 12 ++++++------ 5 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 4ed946601d..1bb986f651 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -10,7 +10,7 @@ - + diff --git a/src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json b/src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json index 46e777436b..46a6c45b4a 100644 --- a/src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json +++ b/src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json @@ -94,8 +94,8 @@ }, "Buildalyzer.Logger": { "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "T+bvSIWns87XNUnE9doORmjHOuH3arOTChGHA1IQlUBmKHs/WQt/0MWYZuool3egVVn/552+6c2j0eoKxPSqbw==" + "resolved": "5.0.1", + "contentHash": "7j7SzfYH69xuNFaGHbf6kRcvPUmeTUOV99+63lM0BPn2L4ThlqU7OM0aliVvlNOp5btr4nuU6kQdet5U3G7kyg==" }, "Castle.Core": { "type": "Transitive", @@ -1623,7 +1623,7 @@ "stryker": { "type": "Project", "dependencies": { - "Buildalyzer": "[5.0.0, )", + "Buildalyzer": "[5.0.1, )", "DotNet.Glob": "[3.1.3, )", "FSharp.Compiler.Service": "[41.0.7, )", "Grynwald.MarkdownGenerator": "[3.0.106, )", @@ -1665,11 +1665,11 @@ }, "Buildalyzer": { "type": "CentralTransitive", - "requested": "[5.0.0, )", - "resolved": "5.0.0", - "contentHash": "iyqVWGyn/hyI/21o6fN0Mp9TYDUKOvzPlIoly4PztyJYDvbX9RgKu1XDTYYlC2CHWrViSgz/FSF9uxee7dxJPg==", + "requested": "[5.0.1, )", + "resolved": "5.0.1", + "contentHash": "q42QUS/g1O3WKNxHPgriAA5i1NbpU30TcTB5oxACgZLo1HF6zxy66OUj2ORaAYC9bQRKXd8J56i2L0vE9lMVTA==", "dependencies": { - "Buildalyzer.Logger": "5.0.0", + "Buildalyzer.Logger": "5.0.1", "MSBuild.StructuredLogger": "2.1.507", "Microsoft.Build": "16.9.0", "Microsoft.Build.Framework": "16.9.0", diff --git a/src/Stryker.CLI/Stryker.CLI/packages.lock.json b/src/Stryker.CLI/Stryker.CLI/packages.lock.json index cc594aaa76..23f3875498 100644 --- a/src/Stryker.CLI/Stryker.CLI/packages.lock.json +++ b/src/Stryker.CLI/Stryker.CLI/packages.lock.json @@ -40,8 +40,8 @@ }, "Buildalyzer.Logger": { "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "T+bvSIWns87XNUnE9doORmjHOuH3arOTChGHA1IQlUBmKHs/WQt/0MWYZuool3egVVn/552+6c2j0eoKxPSqbw==" + "resolved": "5.0.1", + "contentHash": "7j7SzfYH69xuNFaGHbf6kRcvPUmeTUOV99+63lM0BPn2L4ThlqU7OM0aliVvlNOp5btr4nuU6kQdet5U3G7kyg==" }, "FSharp.Core": { "type": "Transitive", @@ -1458,7 +1458,7 @@ "stryker": { "type": "Project", "dependencies": { - "Buildalyzer": "[5.0.0, )", + "Buildalyzer": "[5.0.1, )", "DotNet.Glob": "[3.1.3, )", "FSharp.Compiler.Service": "[41.0.7, )", "Grynwald.MarkdownGenerator": "[3.0.106, )", @@ -1500,11 +1500,11 @@ }, "Buildalyzer": { "type": "CentralTransitive", - "requested": "[5.0.0, )", - "resolved": "5.0.0", - "contentHash": "iyqVWGyn/hyI/21o6fN0Mp9TYDUKOvzPlIoly4PztyJYDvbX9RgKu1XDTYYlC2CHWrViSgz/FSF9uxee7dxJPg==", + "requested": "[5.0.1, )", + "resolved": "5.0.1", + "contentHash": "q42QUS/g1O3WKNxHPgriAA5i1NbpU30TcTB5oxACgZLo1HF6zxy66OUj2ORaAYC9bQRKXd8J56i2L0vE9lMVTA==", "dependencies": { - "Buildalyzer.Logger": "5.0.0", + "Buildalyzer.Logger": "5.0.1", "MSBuild.StructuredLogger": "2.1.507", "Microsoft.Build": "16.9.0", "Microsoft.Build.Framework": "16.9.0", diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/packages.lock.json b/src/Stryker.Core/Stryker.Core.UnitTest/packages.lock.json index 8c37d3c61c..428bc66cc7 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/packages.lock.json +++ b/src/Stryker.Core/Stryker.Core.UnitTest/packages.lock.json @@ -113,8 +113,8 @@ }, "Buildalyzer.Logger": { "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "T+bvSIWns87XNUnE9doORmjHOuH3arOTChGHA1IQlUBmKHs/WQt/0MWYZuool3egVVn/552+6c2j0eoKxPSqbw==" + "resolved": "5.0.1", + "contentHash": "7j7SzfYH69xuNFaGHbf6kRcvPUmeTUOV99+63lM0BPn2L4ThlqU7OM0aliVvlNOp5btr4nuU6kQdet5U3G7kyg==" }, "Castle.Core": { "type": "Transitive", @@ -1590,7 +1590,7 @@ "stryker": { "type": "Project", "dependencies": { - "Buildalyzer": "[5.0.0, )", + "Buildalyzer": "[5.0.1, )", "DotNet.Glob": "[3.1.3, )", "FSharp.Compiler.Service": "[41.0.7, )", "Grynwald.MarkdownGenerator": "[3.0.106, )", @@ -1632,11 +1632,11 @@ }, "Buildalyzer": { "type": "CentralTransitive", - "requested": "[5.0.0, )", - "resolved": "5.0.0", - "contentHash": "iyqVWGyn/hyI/21o6fN0Mp9TYDUKOvzPlIoly4PztyJYDvbX9RgKu1XDTYYlC2CHWrViSgz/FSF9uxee7dxJPg==", + "requested": "[5.0.1, )", + "resolved": "5.0.1", + "contentHash": "q42QUS/g1O3WKNxHPgriAA5i1NbpU30TcTB5oxACgZLo1HF6zxy66OUj2ORaAYC9bQRKXd8J56i2L0vE9lMVTA==", "dependencies": { - "Buildalyzer.Logger": "5.0.0", + "Buildalyzer.Logger": "5.0.1", "MSBuild.StructuredLogger": "2.1.507", "Microsoft.Build": "16.9.0", "Microsoft.Build.Framework": "16.9.0", diff --git a/src/Stryker.Core/Stryker.Core/packages.lock.json b/src/Stryker.Core/Stryker.Core/packages.lock.json index 79c255d35e..a57fc310f7 100644 --- a/src/Stryker.Core/Stryker.Core/packages.lock.json +++ b/src/Stryker.Core/Stryker.Core/packages.lock.json @@ -4,11 +4,11 @@ "net6.0": { "Buildalyzer": { "type": "Direct", - "requested": "[5.0.0, )", - "resolved": "5.0.0", - "contentHash": "iyqVWGyn/hyI/21o6fN0Mp9TYDUKOvzPlIoly4PztyJYDvbX9RgKu1XDTYYlC2CHWrViSgz/FSF9uxee7dxJPg==", + "requested": "[5.0.1, )", + "resolved": "5.0.1", + "contentHash": "q42QUS/g1O3WKNxHPgriAA5i1NbpU30TcTB5oxACgZLo1HF6zxy66OUj2ORaAYC9bQRKXd8J56i2L0vE9lMVTA==", "dependencies": { - "Buildalyzer.Logger": "5.0.0", + "Buildalyzer.Logger": "5.0.1", "MSBuild.StructuredLogger": "2.1.507", "Microsoft.Build": "16.9.0", "Microsoft.Build.Framework": "16.9.0", @@ -244,8 +244,8 @@ }, "Buildalyzer.Logger": { "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "T+bvSIWns87XNUnE9doORmjHOuH3arOTChGHA1IQlUBmKHs/WQt/0MWYZuool3egVVn/552+6c2j0eoKxPSqbw==" + "resolved": "5.0.1", + "contentHash": "7j7SzfYH69xuNFaGHbf6kRcvPUmeTUOV99+63lM0BPn2L4ThlqU7OM0aliVvlNOp5btr4nuU6kQdet5U3G7kyg==" }, "FSharp.Core": { "type": "Transitive", From 5fb4f2ee028bcbbf959791553373df8e2b1cdf66 Mon Sep 17 00:00:00 2001 From: Rouke Broersma Date: Tue, 5 Sep 2023 09:55:16 +0200 Subject: [PATCH 02/22] chore: fix page links for site --- adding_a_mutator.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adding_a_mutator.md b/adding_a_mutator.md index 7aaa6c19ea..0ad3f11c52 100644 --- a/adding_a_mutator.md +++ b/adding_a_mutator.md @@ -73,8 +73,8 @@ You need to: - It is ok to mutate new constructs (such as arrow expression) and leave the old constructs as is. The reverse is not true. - Your mutator must return an empty list (or `yield break`) if it cannot generate any mutation. - Mutator must not throw. -- Make sure to update the [mutations documentation](docs/mutations.md). +- Make sure to update the [mutations documentation](./docs/mutations.md). -[Back to main contributing document](CONTRIBUTING.md). +[Back to main contributing document](./CONTRIBUTING.md). [1]: https://docs.microsoft.com/en-us/dotnet/csharp/roslyn-sdk/get-started/syntax-analysis "Get started with syntax analysis" From 0ba3f77d82ecc3e091112d6f2ebd98d28a336bd3 Mon Sep 17 00:00:00 2001 From: Pent Ploompuu Date: Fri, 15 Sep 2023 12:43:03 +0300 Subject: [PATCH 03/22] fix: Don't fail the test run if restoring test assemblies fails (#2664) --- .../ProjectComponents/TestProjects/TestProjectsInfo.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestProjectsInfo.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestProjectsInfo.cs index 2d995ad0a3..aee0f7970a 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestProjectsInfo.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestProjectsInfo.cs @@ -43,7 +43,14 @@ public void RestoreOriginalAssembly(IAnalyzerResult sourceProject) var backupFilePath = GetBackupName(injectionPath); if (_fileSystem.File.Exists(backupFilePath)) { - _fileSystem.File.Copy(backupFilePath, injectionPath, true); + try + { + _fileSystem.File.Copy(backupFilePath, injectionPath, true); + } + catch (IOException ex) + { + _logger.LogWarning(ex, "Failed to restore output assembly {Path}. Mutated assembly is still in place.", injectionPath); + } } } } From 71219a2f9494faf2c046b7170f906c2b8ba12007 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 18 Sep 2023 02:38:24 +0000 Subject: [PATCH 04/22] chore(deps): update xunit-dotnet monorepo to v2.5.1 (#2673) * chore(deps): update xunit-dotnet monorepo to v2.5.1 * Update package lock files --------- Co-authored-by: Renovatebot --- .../boolMutateTestApp.Test.fsproj | 4 +- .../Xamarin.Forms.Tests.csproj | 4 +- .../EmptyTestProject/EmptyTestProject.csproj | 4 +- .../EmptyTestProject/packages.lock.json | 44 +++++++++---------- .../ExtraProject.XUnit.csproj | 4 +- .../ExtraProject.XUnit/packages.lock.json | 44 +++++++++---------- .../Library.FSharp.XUnit.fsproj | 4 +- .../Library.FSharp.XUnit/packages.lock.json | 44 +++++++++---------- .../NetCoreTestProject.XUnit.csproj | 4 +- .../packages.lock.json | 44 +++++++++---------- .../ValidationProject/Validation.csproj | 4 +- src/Directory.Packages.props | 4 +- .../Stryker.CLI.UnitTest/packages.lock.json | 44 +++++++++---------- .../Stryker.Core.UnitTest/packages.lock.json | 44 +++++++++---------- .../packages.lock.json | 44 +++++++++---------- 15 files changed, 170 insertions(+), 170 deletions(-) diff --git a/ExampleProjects/FsharpMutateTestApp/boolMutateTestApp.Test/boolMutateTestApp.Test.fsproj b/ExampleProjects/FsharpMutateTestApp/boolMutateTestApp.Test/boolMutateTestApp.Test.fsproj index b0f9c6a74f..c0ec082977 100644 --- a/ExampleProjects/FsharpMutateTestApp/boolMutateTestApp.Test/boolMutateTestApp.Test.fsproj +++ b/ExampleProjects/FsharpMutateTestApp/boolMutateTestApp.Test/boolMutateTestApp.Test.fsproj @@ -14,8 +14,8 @@ - - + + diff --git a/ExampleProjects/Xamarin.Forms/Xamarin.Forms.Tests/Xamarin.Forms.Tests.csproj b/ExampleProjects/Xamarin.Forms/Xamarin.Forms.Tests/Xamarin.Forms.Tests.csproj index 2dee394d80..f39facda97 100644 --- a/ExampleProjects/Xamarin.Forms/Xamarin.Forms.Tests/Xamarin.Forms.Tests.csproj +++ b/ExampleProjects/Xamarin.Forms/Xamarin.Forms.Tests/Xamarin.Forms.Tests.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/integrationtest/TargetProjects/EmptyTestProject/EmptyTestProject.csproj b/integrationtest/TargetProjects/EmptyTestProject/EmptyTestProject.csproj index 788065c443..b93e8faeba 100644 --- a/integrationtest/TargetProjects/EmptyTestProject/EmptyTestProject.csproj +++ b/integrationtest/TargetProjects/EmptyTestProject/EmptyTestProject.csproj @@ -11,8 +11,8 @@ - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/integrationtest/TargetProjects/EmptyTestProject/packages.lock.json b/integrationtest/TargetProjects/EmptyTestProject/packages.lock.json index b6daf051d1..147abd1643 100644 --- a/integrationtest/TargetProjects/EmptyTestProject/packages.lock.json +++ b/integrationtest/TargetProjects/EmptyTestProject/packages.lock.json @@ -20,20 +20,20 @@ }, "xunit": { "type": "Direct", - "requested": "[2.5.0, )", - "resolved": "2.5.0", - "contentHash": "f2V5wuAdoaq0mRTt9UBmPbVex9HcwFYn+y7WaKUz5Xpakcrv7lhtQWBJUWNY4N3Z+o+atDBLyAALM1QWx04C6Q==", + "requested": "[2.5.1, )", + "resolved": "2.5.1", + "contentHash": "WJJ7Ruxv1INF4ySosVZ0fN1dGhzNBEdLLZoIVn4TPU8CbYgaxUebAL/VPaBneXGT3EDE2llsJ2cKzGkGeZSY4Q==", "dependencies": { - "xunit.analyzers": "1.2.0", - "xunit.assert": "2.5.0", - "xunit.core": "[2.5.0]" + "xunit.analyzers": "1.3.0", + "xunit.assert": "2.5.1", + "xunit.core": "[2.5.1]" } }, "xunit.runner.visualstudio": { "type": "Direct", - "requested": "[2.5.0, )", - "resolved": "2.5.0", - "contentHash": "+Gp9vuC2431yPyKB15YrOTxCuEAErBQUTIs6CquumX1F073UaPHGW0VE/XVJLMh9W4sXdz3TBkcHdFWZrRn2Hw==" + "requested": "[2.5.1, )", + "resolved": "2.5.1", + "contentHash": "W5dQj2tysIY6MHaidZyqyiR7MGFEk+FrvHRapFyhe11HuR4A6aFGSVi8txi+kkXdY9FDjXffU/1PkNzRX52Caw==" }, "Microsoft.CodeCoverage": { "type": "Transitive", @@ -978,30 +978,30 @@ }, "xunit.analyzers": { "type": "Transitive", - "resolved": "1.2.0", - "contentHash": "d3dehV/DASLRlR8stWQmbPPjfYC2tct50Evav+OlsJMkfFqkhYvzO1k0s81lk0px8O0knZU/FqC8SqbXOtn+hw==" + "resolved": "1.3.0", + "contentHash": "gSk+8RC6UZ6Fzx1OHoB2bPyENeg3WHIeJhB/hb4oZNN0pW0dwOuplJay6OnqFIvW8T37re/RB4PWpEvayWIO1Q==" }, "xunit.assert": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "wN84pKX5jzfpgJ0bB6arrCA/oelBeYLCpnQ9Wj5xGEVPydKzVSDY5tEatFLHE/rO0+0RC+I4H5igGE118jRh1w==", + "resolved": "2.5.1", + "contentHash": "eMvuz6PFdD3DDeaXkFVwMzNZ40zcRoM9Zz3siAyWgfiAucSNOWZnVgqC8hSHbdMd98Gy6o0yIYG6mq4Tg37rrQ==", "dependencies": { "NETStandard.Library": "1.6.1" } }, "xunit.core": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "dnV0Mn2s1C0y2m33AylQyMkEyhBQsL4R0302kwSGiEGuY3JwzEmhTa9pnghyMRPliYSs4fXfkEAP+5bKXryGFg==", + "resolved": "2.5.1", + "contentHash": "Tzuz//XwPJYAmC9FBIwgBgo5gb2kSoppDwkisyYhq0wtwxhv+gOJwtqUgkgk8Hr19B616Zol03LkD18r2e4AxA==", "dependencies": { - "xunit.extensibility.core": "[2.5.0]", - "xunit.extensibility.execution": "[2.5.0]" + "xunit.extensibility.core": "[2.5.1]", + "xunit.extensibility.execution": "[2.5.1]" } }, "xunit.extensibility.core": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "xRm6NIV3i7I+LkjsAJ91Xz2fxJm/oMEi2CYq1G5HlGTgcK1Zo2wNbLO6nKX1VG5FZzXibSdoLwr/MofVvh3mFA==", + "resolved": "2.5.1", + "contentHash": "XGPiWP7D/KIY/fzdmU9gx7eDt0QD0IAWOy54LI+ckLZCqFMupIFochC3dHRxykuAz+L0nYvz6PxDdR2UcgNmDw==", "dependencies": { "NETStandard.Library": "1.6.1", "xunit.abstractions": "2.0.3" @@ -1009,11 +1009,11 @@ }, "xunit.extensibility.execution": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "7+v2Bvp+1ew1iMGQVb1glICi8jcNdHbRUX6Ru0dmJBViGdjiS7kyqcX2VxleQhFbKNi+WF0an7/TeTXD283RlQ==", + "resolved": "2.5.1", + "contentHash": "I5IUervdZoKLD66TUcqsJDXcB3ui9RxzKe0MQGzEi4Hsxkaoz0YylmvwqW2nd3nilyqqIAs0OUaZf/faKPxY6w==", "dependencies": { "NETStandard.Library": "1.6.1", - "xunit.extensibility.core": "[2.5.0]" + "xunit.extensibility.core": "[2.5.1]" } }, "library": { diff --git a/integrationtest/TargetProjects/ExtraProject.XUnit/ExtraProject.XUnit.csproj b/integrationtest/TargetProjects/ExtraProject.XUnit/ExtraProject.XUnit.csproj index 5d83b110cc..1693530269 100644 --- a/integrationtest/TargetProjects/ExtraProject.XUnit/ExtraProject.XUnit.csproj +++ b/integrationtest/TargetProjects/ExtraProject.XUnit/ExtraProject.XUnit.csproj @@ -8,8 +8,8 @@ - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/integrationtest/TargetProjects/ExtraProject.XUnit/packages.lock.json b/integrationtest/TargetProjects/ExtraProject.XUnit/packages.lock.json index ea8d806c4b..0729a1c0e8 100644 --- a/integrationtest/TargetProjects/ExtraProject.XUnit/packages.lock.json +++ b/integrationtest/TargetProjects/ExtraProject.XUnit/packages.lock.json @@ -20,20 +20,20 @@ }, "xunit": { "type": "Direct", - "requested": "[2.5.0, )", - "resolved": "2.5.0", - "contentHash": "f2V5wuAdoaq0mRTt9UBmPbVex9HcwFYn+y7WaKUz5Xpakcrv7lhtQWBJUWNY4N3Z+o+atDBLyAALM1QWx04C6Q==", + "requested": "[2.5.1, )", + "resolved": "2.5.1", + "contentHash": "WJJ7Ruxv1INF4ySosVZ0fN1dGhzNBEdLLZoIVn4TPU8CbYgaxUebAL/VPaBneXGT3EDE2llsJ2cKzGkGeZSY4Q==", "dependencies": { - "xunit.analyzers": "1.2.0", - "xunit.assert": "2.5.0", - "xunit.core": "[2.5.0]" + "xunit.analyzers": "1.3.0", + "xunit.assert": "2.5.1", + "xunit.core": "[2.5.1]" } }, "xunit.runner.visualstudio": { "type": "Direct", - "requested": "[2.5.0, )", - "resolved": "2.5.0", - "contentHash": "+Gp9vuC2431yPyKB15YrOTxCuEAErBQUTIs6CquumX1F073UaPHGW0VE/XVJLMh9W4sXdz3TBkcHdFWZrRn2Hw==" + "requested": "[2.5.1, )", + "resolved": "2.5.1", + "contentHash": "W5dQj2tysIY6MHaidZyqyiR7MGFEk+FrvHRapFyhe11HuR4A6aFGSVi8txi+kkXdY9FDjXffU/1PkNzRX52Caw==" }, "Microsoft.CodeCoverage": { "type": "Transitive", @@ -978,30 +978,30 @@ }, "xunit.analyzers": { "type": "Transitive", - "resolved": "1.2.0", - "contentHash": "d3dehV/DASLRlR8stWQmbPPjfYC2tct50Evav+OlsJMkfFqkhYvzO1k0s81lk0px8O0knZU/FqC8SqbXOtn+hw==" + "resolved": "1.3.0", + "contentHash": "gSk+8RC6UZ6Fzx1OHoB2bPyENeg3WHIeJhB/hb4oZNN0pW0dwOuplJay6OnqFIvW8T37re/RB4PWpEvayWIO1Q==" }, "xunit.assert": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "wN84pKX5jzfpgJ0bB6arrCA/oelBeYLCpnQ9Wj5xGEVPydKzVSDY5tEatFLHE/rO0+0RC+I4H5igGE118jRh1w==", + "resolved": "2.5.1", + "contentHash": "eMvuz6PFdD3DDeaXkFVwMzNZ40zcRoM9Zz3siAyWgfiAucSNOWZnVgqC8hSHbdMd98Gy6o0yIYG6mq4Tg37rrQ==", "dependencies": { "NETStandard.Library": "1.6.1" } }, "xunit.core": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "dnV0Mn2s1C0y2m33AylQyMkEyhBQsL4R0302kwSGiEGuY3JwzEmhTa9pnghyMRPliYSs4fXfkEAP+5bKXryGFg==", + "resolved": "2.5.1", + "contentHash": "Tzuz//XwPJYAmC9FBIwgBgo5gb2kSoppDwkisyYhq0wtwxhv+gOJwtqUgkgk8Hr19B616Zol03LkD18r2e4AxA==", "dependencies": { - "xunit.extensibility.core": "[2.5.0]", - "xunit.extensibility.execution": "[2.5.0]" + "xunit.extensibility.core": "[2.5.1]", + "xunit.extensibility.execution": "[2.5.1]" } }, "xunit.extensibility.core": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "xRm6NIV3i7I+LkjsAJ91Xz2fxJm/oMEi2CYq1G5HlGTgcK1Zo2wNbLO6nKX1VG5FZzXibSdoLwr/MofVvh3mFA==", + "resolved": "2.5.1", + "contentHash": "XGPiWP7D/KIY/fzdmU9gx7eDt0QD0IAWOy54LI+ckLZCqFMupIFochC3dHRxykuAz+L0nYvz6PxDdR2UcgNmDw==", "dependencies": { "NETStandard.Library": "1.6.1", "xunit.abstractions": "2.0.3" @@ -1009,11 +1009,11 @@ }, "xunit.extensibility.execution": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "7+v2Bvp+1ew1iMGQVb1glICi8jcNdHbRUX6Ru0dmJBViGdjiS7kyqcX2VxleQhFbKNi+WF0an7/TeTXD283RlQ==", + "resolved": "2.5.1", + "contentHash": "I5IUervdZoKLD66TUcqsJDXcB3ui9RxzKe0MQGzEi4Hsxkaoz0YylmvwqW2nd3nilyqqIAs0OUaZf/faKPxY6w==", "dependencies": { "NETStandard.Library": "1.6.1", - "xunit.extensibility.core": "[2.5.0]" + "xunit.extensibility.core": "[2.5.1]" } }, "extraproject": { diff --git a/integrationtest/TargetProjects/Library.FSharp.XUnit/Library.FSharp.XUnit.fsproj b/integrationtest/TargetProjects/Library.FSharp.XUnit/Library.FSharp.XUnit.fsproj index 276a5df8f6..f2d4ca9457 100644 --- a/integrationtest/TargetProjects/Library.FSharp.XUnit/Library.FSharp.XUnit.fsproj +++ b/integrationtest/TargetProjects/Library.FSharp.XUnit/Library.FSharp.XUnit.fsproj @@ -15,8 +15,8 @@ - - + + diff --git a/integrationtest/TargetProjects/Library.FSharp.XUnit/packages.lock.json b/integrationtest/TargetProjects/Library.FSharp.XUnit/packages.lock.json index cbc69da24f..fb15560b09 100644 --- a/integrationtest/TargetProjects/Library.FSharp.XUnit/packages.lock.json +++ b/integrationtest/TargetProjects/Library.FSharp.XUnit/packages.lock.json @@ -20,20 +20,20 @@ }, "xunit": { "type": "Direct", - "requested": "[2.5.0, )", - "resolved": "2.5.0", - "contentHash": "f2V5wuAdoaq0mRTt9UBmPbVex9HcwFYn+y7WaKUz5Xpakcrv7lhtQWBJUWNY4N3Z+o+atDBLyAALM1QWx04C6Q==", + "requested": "[2.5.1, )", + "resolved": "2.5.1", + "contentHash": "WJJ7Ruxv1INF4ySosVZ0fN1dGhzNBEdLLZoIVn4TPU8CbYgaxUebAL/VPaBneXGT3EDE2llsJ2cKzGkGeZSY4Q==", "dependencies": { - "xunit.analyzers": "1.2.0", - "xunit.assert": "2.5.0", - "xunit.core": "[2.5.0]" + "xunit.analyzers": "1.3.0", + "xunit.assert": "2.5.1", + "xunit.core": "[2.5.1]" } }, "xunit.runner.visualstudio": { "type": "Direct", - "requested": "[2.5.0, )", - "resolved": "2.5.0", - "contentHash": "+Gp9vuC2431yPyKB15YrOTxCuEAErBQUTIs6CquumX1F073UaPHGW0VE/XVJLMh9W4sXdz3TBkcHdFWZrRn2Hw==" + "requested": "[2.5.1, )", + "resolved": "2.5.1", + "contentHash": "W5dQj2tysIY6MHaidZyqyiR7MGFEk+FrvHRapFyhe11HuR4A6aFGSVi8txi+kkXdY9FDjXffU/1PkNzRX52Caw==" }, "Microsoft.CodeCoverage": { "type": "Transitive", @@ -978,30 +978,30 @@ }, "xunit.analyzers": { "type": "Transitive", - "resolved": "1.2.0", - "contentHash": "d3dehV/DASLRlR8stWQmbPPjfYC2tct50Evav+OlsJMkfFqkhYvzO1k0s81lk0px8O0knZU/FqC8SqbXOtn+hw==" + "resolved": "1.3.0", + "contentHash": "gSk+8RC6UZ6Fzx1OHoB2bPyENeg3WHIeJhB/hb4oZNN0pW0dwOuplJay6OnqFIvW8T37re/RB4PWpEvayWIO1Q==" }, "xunit.assert": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "wN84pKX5jzfpgJ0bB6arrCA/oelBeYLCpnQ9Wj5xGEVPydKzVSDY5tEatFLHE/rO0+0RC+I4H5igGE118jRh1w==", + "resolved": "2.5.1", + "contentHash": "eMvuz6PFdD3DDeaXkFVwMzNZ40zcRoM9Zz3siAyWgfiAucSNOWZnVgqC8hSHbdMd98Gy6o0yIYG6mq4Tg37rrQ==", "dependencies": { "NETStandard.Library": "1.6.1" } }, "xunit.core": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "dnV0Mn2s1C0y2m33AylQyMkEyhBQsL4R0302kwSGiEGuY3JwzEmhTa9pnghyMRPliYSs4fXfkEAP+5bKXryGFg==", + "resolved": "2.5.1", + "contentHash": "Tzuz//XwPJYAmC9FBIwgBgo5gb2kSoppDwkisyYhq0wtwxhv+gOJwtqUgkgk8Hr19B616Zol03LkD18r2e4AxA==", "dependencies": { - "xunit.extensibility.core": "[2.5.0]", - "xunit.extensibility.execution": "[2.5.0]" + "xunit.extensibility.core": "[2.5.1]", + "xunit.extensibility.execution": "[2.5.1]" } }, "xunit.extensibility.core": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "xRm6NIV3i7I+LkjsAJ91Xz2fxJm/oMEi2CYq1G5HlGTgcK1Zo2wNbLO6nKX1VG5FZzXibSdoLwr/MofVvh3mFA==", + "resolved": "2.5.1", + "contentHash": "XGPiWP7D/KIY/fzdmU9gx7eDt0QD0IAWOy54LI+ckLZCqFMupIFochC3dHRxykuAz+L0nYvz6PxDdR2UcgNmDw==", "dependencies": { "NETStandard.Library": "1.6.1", "xunit.abstractions": "2.0.3" @@ -1009,11 +1009,11 @@ }, "xunit.extensibility.execution": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "7+v2Bvp+1ew1iMGQVb1glICi8jcNdHbRUX6Ru0dmJBViGdjiS7kyqcX2VxleQhFbKNi+WF0an7/TeTXD283RlQ==", + "resolved": "2.5.1", + "contentHash": "I5IUervdZoKLD66TUcqsJDXcB3ui9RxzKe0MQGzEi4Hsxkaoz0YylmvwqW2nd3nilyqqIAs0OUaZf/faKPxY6w==", "dependencies": { "NETStandard.Library": "1.6.1", - "xunit.extensibility.core": "[2.5.0]" + "xunit.extensibility.core": "[2.5.1]" } }, "library.fsharp": { diff --git a/integrationtest/TargetProjects/NetCoreTestProject.XUnit/NetCoreTestProject.XUnit.csproj b/integrationtest/TargetProjects/NetCoreTestProject.XUnit/NetCoreTestProject.XUnit.csproj index 80f6cb0020..802ecc0a37 100644 --- a/integrationtest/TargetProjects/NetCoreTestProject.XUnit/NetCoreTestProject.XUnit.csproj +++ b/integrationtest/TargetProjects/NetCoreTestProject.XUnit/NetCoreTestProject.XUnit.csproj @@ -10,8 +10,8 @@ - - + + diff --git a/integrationtest/TargetProjects/NetCoreTestProject.XUnit/packages.lock.json b/integrationtest/TargetProjects/NetCoreTestProject.XUnit/packages.lock.json index c290fcf286..e5e0927213 100644 --- a/integrationtest/TargetProjects/NetCoreTestProject.XUnit/packages.lock.json +++ b/integrationtest/TargetProjects/NetCoreTestProject.XUnit/packages.lock.json @@ -14,20 +14,20 @@ }, "xunit": { "type": "Direct", - "requested": "[2.5.0, )", - "resolved": "2.5.0", - "contentHash": "f2V5wuAdoaq0mRTt9UBmPbVex9HcwFYn+y7WaKUz5Xpakcrv7lhtQWBJUWNY4N3Z+o+atDBLyAALM1QWx04C6Q==", + "requested": "[2.5.1, )", + "resolved": "2.5.1", + "contentHash": "WJJ7Ruxv1INF4ySosVZ0fN1dGhzNBEdLLZoIVn4TPU8CbYgaxUebAL/VPaBneXGT3EDE2llsJ2cKzGkGeZSY4Q==", "dependencies": { - "xunit.analyzers": "1.2.0", - "xunit.assert": "2.5.0", - "xunit.core": "[2.5.0]" + "xunit.analyzers": "1.3.0", + "xunit.assert": "2.5.1", + "xunit.core": "[2.5.1]" } }, "xunit.runner.visualstudio": { "type": "Direct", - "requested": "[2.5.0, )", - "resolved": "2.5.0", - "contentHash": "+Gp9vuC2431yPyKB15YrOTxCuEAErBQUTIs6CquumX1F073UaPHGW0VE/XVJLMh9W4sXdz3TBkcHdFWZrRn2Hw==" + "requested": "[2.5.1, )", + "resolved": "2.5.1", + "contentHash": "W5dQj2tysIY6MHaidZyqyiR7MGFEk+FrvHRapFyhe11HuR4A6aFGSVi8txi+kkXdY9FDjXffU/1PkNzRX52Caw==" }, "Microsoft.CodeCoverage": { "type": "Transitive", @@ -972,30 +972,30 @@ }, "xunit.analyzers": { "type": "Transitive", - "resolved": "1.2.0", - "contentHash": "d3dehV/DASLRlR8stWQmbPPjfYC2tct50Evav+OlsJMkfFqkhYvzO1k0s81lk0px8O0knZU/FqC8SqbXOtn+hw==" + "resolved": "1.3.0", + "contentHash": "gSk+8RC6UZ6Fzx1OHoB2bPyENeg3WHIeJhB/hb4oZNN0pW0dwOuplJay6OnqFIvW8T37re/RB4PWpEvayWIO1Q==" }, "xunit.assert": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "wN84pKX5jzfpgJ0bB6arrCA/oelBeYLCpnQ9Wj5xGEVPydKzVSDY5tEatFLHE/rO0+0RC+I4H5igGE118jRh1w==", + "resolved": "2.5.1", + "contentHash": "eMvuz6PFdD3DDeaXkFVwMzNZ40zcRoM9Zz3siAyWgfiAucSNOWZnVgqC8hSHbdMd98Gy6o0yIYG6mq4Tg37rrQ==", "dependencies": { "NETStandard.Library": "1.6.1" } }, "xunit.core": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "dnV0Mn2s1C0y2m33AylQyMkEyhBQsL4R0302kwSGiEGuY3JwzEmhTa9pnghyMRPliYSs4fXfkEAP+5bKXryGFg==", + "resolved": "2.5.1", + "contentHash": "Tzuz//XwPJYAmC9FBIwgBgo5gb2kSoppDwkisyYhq0wtwxhv+gOJwtqUgkgk8Hr19B616Zol03LkD18r2e4AxA==", "dependencies": { - "xunit.extensibility.core": "[2.5.0]", - "xunit.extensibility.execution": "[2.5.0]" + "xunit.extensibility.core": "[2.5.1]", + "xunit.extensibility.execution": "[2.5.1]" } }, "xunit.extensibility.core": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "xRm6NIV3i7I+LkjsAJ91Xz2fxJm/oMEi2CYq1G5HlGTgcK1Zo2wNbLO6nKX1VG5FZzXibSdoLwr/MofVvh3mFA==", + "resolved": "2.5.1", + "contentHash": "XGPiWP7D/KIY/fzdmU9gx7eDt0QD0IAWOy54LI+ckLZCqFMupIFochC3dHRxykuAz+L0nYvz6PxDdR2UcgNmDw==", "dependencies": { "NETStandard.Library": "1.6.1", "xunit.abstractions": "2.0.3" @@ -1003,11 +1003,11 @@ }, "xunit.extensibility.execution": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "7+v2Bvp+1ew1iMGQVb1glICi8jcNdHbRUX6Ru0dmJBViGdjiS7kyqcX2VxleQhFbKNi+WF0an7/TeTXD283RlQ==", + "resolved": "2.5.1", + "contentHash": "I5IUervdZoKLD66TUcqsJDXcB3ui9RxzKe0MQGzEi4Hsxkaoz0YylmvwqW2nd3nilyqqIAs0OUaZf/faKPxY6w==", "dependencies": { "NETStandard.Library": "1.6.1", - "xunit.extensibility.core": "[2.5.0]" + "xunit.extensibility.core": "[2.5.1]" } }, "library": { diff --git a/integrationtest/ValidationProject/Validation.csproj b/integrationtest/ValidationProject/Validation.csproj index b871c71362..1ad1581010 100644 --- a/integrationtest/ValidationProject/Validation.csproj +++ b/integrationtest/ValidationProject/Validation.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 1bb986f651..16efe59329 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -38,8 +38,8 @@ - - + + diff --git a/src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json b/src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json index 46a6c45b4a..412dfdd158 100644 --- a/src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json +++ b/src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json @@ -77,20 +77,20 @@ }, "xunit": { "type": "Direct", - "requested": "[2.5.0, )", - "resolved": "2.5.0", - "contentHash": "f2V5wuAdoaq0mRTt9UBmPbVex9HcwFYn+y7WaKUz5Xpakcrv7lhtQWBJUWNY4N3Z+o+atDBLyAALM1QWx04C6Q==", + "requested": "[2.5.1, )", + "resolved": "2.5.1", + "contentHash": "WJJ7Ruxv1INF4ySosVZ0fN1dGhzNBEdLLZoIVn4TPU8CbYgaxUebAL/VPaBneXGT3EDE2llsJ2cKzGkGeZSY4Q==", "dependencies": { - "xunit.analyzers": "1.2.0", - "xunit.assert": "2.5.0", - "xunit.core": "[2.5.0]" + "xunit.analyzers": "1.3.0", + "xunit.assert": "2.5.1", + "xunit.core": "[2.5.1]" } }, "xunit.runner.visualstudio": { "type": "Direct", - "requested": "[2.5.0, )", - "resolved": "2.5.0", - "contentHash": "+Gp9vuC2431yPyKB15YrOTxCuEAErBQUTIs6CquumX1F073UaPHGW0VE/XVJLMh9W4sXdz3TBkcHdFWZrRn2Hw==" + "requested": "[2.5.1, )", + "resolved": "2.5.1", + "contentHash": "W5dQj2tysIY6MHaidZyqyiR7MGFEk+FrvHRapFyhe11HuR4A6aFGSVi8txi+kkXdY9FDjXffU/1PkNzRX52Caw==" }, "Buildalyzer.Logger": { "type": "Transitive", @@ -1573,30 +1573,30 @@ }, "xunit.analyzers": { "type": "Transitive", - "resolved": "1.2.0", - "contentHash": "d3dehV/DASLRlR8stWQmbPPjfYC2tct50Evav+OlsJMkfFqkhYvzO1k0s81lk0px8O0knZU/FqC8SqbXOtn+hw==" + "resolved": "1.3.0", + "contentHash": "gSk+8RC6UZ6Fzx1OHoB2bPyENeg3WHIeJhB/hb4oZNN0pW0dwOuplJay6OnqFIvW8T37re/RB4PWpEvayWIO1Q==" }, "xunit.assert": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "wN84pKX5jzfpgJ0bB6arrCA/oelBeYLCpnQ9Wj5xGEVPydKzVSDY5tEatFLHE/rO0+0RC+I4H5igGE118jRh1w==", + "resolved": "2.5.1", + "contentHash": "eMvuz6PFdD3DDeaXkFVwMzNZ40zcRoM9Zz3siAyWgfiAucSNOWZnVgqC8hSHbdMd98Gy6o0yIYG6mq4Tg37rrQ==", "dependencies": { "NETStandard.Library": "1.6.1" } }, "xunit.core": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "dnV0Mn2s1C0y2m33AylQyMkEyhBQsL4R0302kwSGiEGuY3JwzEmhTa9pnghyMRPliYSs4fXfkEAP+5bKXryGFg==", + "resolved": "2.5.1", + "contentHash": "Tzuz//XwPJYAmC9FBIwgBgo5gb2kSoppDwkisyYhq0wtwxhv+gOJwtqUgkgk8Hr19B616Zol03LkD18r2e4AxA==", "dependencies": { - "xunit.extensibility.core": "[2.5.0]", - "xunit.extensibility.execution": "[2.5.0]" + "xunit.extensibility.core": "[2.5.1]", + "xunit.extensibility.execution": "[2.5.1]" } }, "xunit.extensibility.core": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "xRm6NIV3i7I+LkjsAJ91Xz2fxJm/oMEi2CYq1G5HlGTgcK1Zo2wNbLO6nKX1VG5FZzXibSdoLwr/MofVvh3mFA==", + "resolved": "2.5.1", + "contentHash": "XGPiWP7D/KIY/fzdmU9gx7eDt0QD0IAWOy54LI+ckLZCqFMupIFochC3dHRxykuAz+L0nYvz6PxDdR2UcgNmDw==", "dependencies": { "NETStandard.Library": "1.6.1", "xunit.abstractions": "2.0.3" @@ -1604,11 +1604,11 @@ }, "xunit.extensibility.execution": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "7+v2Bvp+1ew1iMGQVb1glICi8jcNdHbRUX6Ru0dmJBViGdjiS7kyqcX2VxleQhFbKNi+WF0an7/TeTXD283RlQ==", + "resolved": "2.5.1", + "contentHash": "I5IUervdZoKLD66TUcqsJDXcB3ui9RxzKe0MQGzEi4Hsxkaoz0YylmvwqW2nd3nilyqqIAs0OUaZf/faKPxY6w==", "dependencies": { "NETStandard.Library": "1.6.1", - "xunit.extensibility.core": "[2.5.0]" + "xunit.extensibility.core": "[2.5.1]" } }, "dotnet-stryker": { diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/packages.lock.json b/src/Stryker.Core/Stryker.Core.UnitTest/packages.lock.json index 428bc66cc7..91a159ddbe 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/packages.lock.json +++ b/src/Stryker.Core/Stryker.Core.UnitTest/packages.lock.json @@ -86,20 +86,20 @@ }, "xunit": { "type": "Direct", - "requested": "[2.5.0, )", - "resolved": "2.5.0", - "contentHash": "f2V5wuAdoaq0mRTt9UBmPbVex9HcwFYn+y7WaKUz5Xpakcrv7lhtQWBJUWNY4N3Z+o+atDBLyAALM1QWx04C6Q==", + "requested": "[2.5.1, )", + "resolved": "2.5.1", + "contentHash": "WJJ7Ruxv1INF4ySosVZ0fN1dGhzNBEdLLZoIVn4TPU8CbYgaxUebAL/VPaBneXGT3EDE2llsJ2cKzGkGeZSY4Q==", "dependencies": { - "xunit.analyzers": "1.2.0", - "xunit.assert": "2.5.0", - "xunit.core": "[2.5.0]" + "xunit.analyzers": "1.3.0", + "xunit.assert": "2.5.1", + "xunit.core": "[2.5.1]" } }, "xunit.runner.visualstudio": { "type": "Direct", - "requested": "[2.5.0, )", - "resolved": "2.5.0", - "contentHash": "+Gp9vuC2431yPyKB15YrOTxCuEAErBQUTIs6CquumX1F073UaPHGW0VE/XVJLMh9W4sXdz3TBkcHdFWZrRn2Hw==" + "requested": "[2.5.1, )", + "resolved": "2.5.1", + "contentHash": "W5dQj2tysIY6MHaidZyqyiR7MGFEk+FrvHRapFyhe11HuR4A6aFGSVi8txi+kkXdY9FDjXffU/1PkNzRX52Caw==" }, "Xunit.SkippableFact": { "type": "Direct", @@ -1549,30 +1549,30 @@ }, "xunit.analyzers": { "type": "Transitive", - "resolved": "1.2.0", - "contentHash": "d3dehV/DASLRlR8stWQmbPPjfYC2tct50Evav+OlsJMkfFqkhYvzO1k0s81lk0px8O0knZU/FqC8SqbXOtn+hw==" + "resolved": "1.3.0", + "contentHash": "gSk+8RC6UZ6Fzx1OHoB2bPyENeg3WHIeJhB/hb4oZNN0pW0dwOuplJay6OnqFIvW8T37re/RB4PWpEvayWIO1Q==" }, "xunit.assert": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "wN84pKX5jzfpgJ0bB6arrCA/oelBeYLCpnQ9Wj5xGEVPydKzVSDY5tEatFLHE/rO0+0RC+I4H5igGE118jRh1w==", + "resolved": "2.5.1", + "contentHash": "eMvuz6PFdD3DDeaXkFVwMzNZ40zcRoM9Zz3siAyWgfiAucSNOWZnVgqC8hSHbdMd98Gy6o0yIYG6mq4Tg37rrQ==", "dependencies": { "NETStandard.Library": "1.6.1" } }, "xunit.core": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "dnV0Mn2s1C0y2m33AylQyMkEyhBQsL4R0302kwSGiEGuY3JwzEmhTa9pnghyMRPliYSs4fXfkEAP+5bKXryGFg==", + "resolved": "2.5.1", + "contentHash": "Tzuz//XwPJYAmC9FBIwgBgo5gb2kSoppDwkisyYhq0wtwxhv+gOJwtqUgkgk8Hr19B616Zol03LkD18r2e4AxA==", "dependencies": { - "xunit.extensibility.core": "[2.5.0]", - "xunit.extensibility.execution": "[2.5.0]" + "xunit.extensibility.core": "[2.5.1]", + "xunit.extensibility.execution": "[2.5.1]" } }, "xunit.extensibility.core": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "xRm6NIV3i7I+LkjsAJ91Xz2fxJm/oMEi2CYq1G5HlGTgcK1Zo2wNbLO6nKX1VG5FZzXibSdoLwr/MofVvh3mFA==", + "resolved": "2.5.1", + "contentHash": "XGPiWP7D/KIY/fzdmU9gx7eDt0QD0IAWOy54LI+ckLZCqFMupIFochC3dHRxykuAz+L0nYvz6PxDdR2UcgNmDw==", "dependencies": { "NETStandard.Library": "1.6.1", "xunit.abstractions": "2.0.3" @@ -1580,11 +1580,11 @@ }, "xunit.extensibility.execution": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "7+v2Bvp+1ew1iMGQVb1glICi8jcNdHbRUX6Ru0dmJBViGdjiS7kyqcX2VxleQhFbKNi+WF0an7/TeTXD283RlQ==", + "resolved": "2.5.1", + "contentHash": "I5IUervdZoKLD66TUcqsJDXcB3ui9RxzKe0MQGzEi4Hsxkaoz0YylmvwqW2nd3nilyqqIAs0OUaZf/faKPxY6w==", "dependencies": { "NETStandard.Library": "1.6.1", - "xunit.extensibility.core": "[2.5.0]" + "xunit.extensibility.core": "[2.5.1]" } }, "stryker": { diff --git a/src/Stryker.RegexMutators/Stryker.RegexMutators.UnitTest/packages.lock.json b/src/Stryker.RegexMutators/Stryker.RegexMutators.UnitTest/packages.lock.json index d2b6955b8e..92c4b5ab07 100644 --- a/src/Stryker.RegexMutators/Stryker.RegexMutators.UnitTest/packages.lock.json +++ b/src/Stryker.RegexMutators/Stryker.RegexMutators.UnitTest/packages.lock.json @@ -54,20 +54,20 @@ }, "xunit": { "type": "Direct", - "requested": "[2.5.0, )", - "resolved": "2.5.0", - "contentHash": "f2V5wuAdoaq0mRTt9UBmPbVex9HcwFYn+y7WaKUz5Xpakcrv7lhtQWBJUWNY4N3Z+o+atDBLyAALM1QWx04C6Q==", + "requested": "[2.5.1, )", + "resolved": "2.5.1", + "contentHash": "WJJ7Ruxv1INF4ySosVZ0fN1dGhzNBEdLLZoIVn4TPU8CbYgaxUebAL/VPaBneXGT3EDE2llsJ2cKzGkGeZSY4Q==", "dependencies": { - "xunit.analyzers": "1.2.0", - "xunit.assert": "2.5.0", - "xunit.core": "[2.5.0]" + "xunit.analyzers": "1.3.0", + "xunit.assert": "2.5.1", + "xunit.core": "[2.5.1]" } }, "xunit.runner.visualstudio": { "type": "Direct", - "requested": "[2.5.0, )", - "resolved": "2.5.0", - "contentHash": "+Gp9vuC2431yPyKB15YrOTxCuEAErBQUTIs6CquumX1F073UaPHGW0VE/XVJLMh9W4sXdz3TBkcHdFWZrRn2Hw==" + "requested": "[2.5.1, )", + "resolved": "2.5.1", + "contentHash": "W5dQj2tysIY6MHaidZyqyiR7MGFEk+FrvHRapFyhe11HuR4A6aFGSVi8txi+kkXdY9FDjXffU/1PkNzRX52Caw==" }, "DiffEngine": { "type": "Transitive", @@ -1071,30 +1071,30 @@ }, "xunit.analyzers": { "type": "Transitive", - "resolved": "1.2.0", - "contentHash": "d3dehV/DASLRlR8stWQmbPPjfYC2tct50Evav+OlsJMkfFqkhYvzO1k0s81lk0px8O0knZU/FqC8SqbXOtn+hw==" + "resolved": "1.3.0", + "contentHash": "gSk+8RC6UZ6Fzx1OHoB2bPyENeg3WHIeJhB/hb4oZNN0pW0dwOuplJay6OnqFIvW8T37re/RB4PWpEvayWIO1Q==" }, "xunit.assert": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "wN84pKX5jzfpgJ0bB6arrCA/oelBeYLCpnQ9Wj5xGEVPydKzVSDY5tEatFLHE/rO0+0RC+I4H5igGE118jRh1w==", + "resolved": "2.5.1", + "contentHash": "eMvuz6PFdD3DDeaXkFVwMzNZ40zcRoM9Zz3siAyWgfiAucSNOWZnVgqC8hSHbdMd98Gy6o0yIYG6mq4Tg37rrQ==", "dependencies": { "NETStandard.Library": "1.6.1" } }, "xunit.core": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "dnV0Mn2s1C0y2m33AylQyMkEyhBQsL4R0302kwSGiEGuY3JwzEmhTa9pnghyMRPliYSs4fXfkEAP+5bKXryGFg==", + "resolved": "2.5.1", + "contentHash": "Tzuz//XwPJYAmC9FBIwgBgo5gb2kSoppDwkisyYhq0wtwxhv+gOJwtqUgkgk8Hr19B616Zol03LkD18r2e4AxA==", "dependencies": { - "xunit.extensibility.core": "[2.5.0]", - "xunit.extensibility.execution": "[2.5.0]" + "xunit.extensibility.core": "[2.5.1]", + "xunit.extensibility.execution": "[2.5.1]" } }, "xunit.extensibility.core": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "xRm6NIV3i7I+LkjsAJ91Xz2fxJm/oMEi2CYq1G5HlGTgcK1Zo2wNbLO6nKX1VG5FZzXibSdoLwr/MofVvh3mFA==", + "resolved": "2.5.1", + "contentHash": "XGPiWP7D/KIY/fzdmU9gx7eDt0QD0IAWOy54LI+ckLZCqFMupIFochC3dHRxykuAz+L0nYvz6PxDdR2UcgNmDw==", "dependencies": { "NETStandard.Library": "1.6.1", "xunit.abstractions": "2.0.3" @@ -1102,11 +1102,11 @@ }, "xunit.extensibility.execution": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "7+v2Bvp+1ew1iMGQVb1glICi8jcNdHbRUX6Ru0dmJBViGdjiS7kyqcX2VxleQhFbKNi+WF0an7/TeTXD283RlQ==", + "resolved": "2.5.1", + "contentHash": "I5IUervdZoKLD66TUcqsJDXcB3ui9RxzKe0MQGzEi4Hsxkaoz0YylmvwqW2nd3nilyqqIAs0OUaZf/faKPxY6w==", "dependencies": { "NETStandard.Library": "1.6.1", - "xunit.extensibility.core": "[2.5.0]" + "xunit.extensibility.core": "[2.5.1]" } }, "stryker.regexmutators": { From 66d566b9aa5ca8ee8388a76622ec500fa7a214b2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 20 Sep 2023 17:12:28 +0000 Subject: [PATCH 05/22] chore(deps): update dependency yamldotnet to v13.4.0 (#2677) * chore(deps): update dependency yamldotnet to v13.4.0 * Update package lock files --------- Co-authored-by: Renovatebot --- src/Directory.Packages.props | 2 +- src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json | 8 ++++---- src/Stryker.CLI/Stryker.CLI/packages.lock.json | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 16efe59329..4c5e94f243 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -5,7 +5,7 @@ - + diff --git a/src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json b/src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json index 412dfdd158..f614cd4c03 100644 --- a/src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json +++ b/src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json @@ -1616,7 +1616,7 @@ "dependencies": { "McMaster.Extensions.CommandLineUtils": "[4.1.0, )", "NuGet.Protocol": "[6.7.0, )", - "YamlDotNet": "[13.3.1, )", + "YamlDotNet": "[13.4.0, )", "stryker": "[3.10.0, )" } }, @@ -1917,9 +1917,9 @@ }, "YamlDotNet": { "type": "CentralTransitive", - "requested": "[13.3.1, )", - "resolved": "13.3.1", - "contentHash": "Q2dqDsb0xAlr092grgHk8/vTXI2snIiYM5ND3IXkgJDFIdPnqDYwYnlk+gwzSeRByDLhiSzTog8uT7xFwH68Zg==" + "requested": "[13.4.0, )", + "resolved": "13.4.0", + "contentHash": "XkqTRgpt/tkqX9sOKcdPAZLVMktR5sBFwt7aK/PP061k9yoUntr/Qc8o9KshjSte34WYTIuCrpBs1+LwR7dFdA==" } } } diff --git a/src/Stryker.CLI/Stryker.CLI/packages.lock.json b/src/Stryker.CLI/Stryker.CLI/packages.lock.json index 23f3875498..742e5cba65 100644 --- a/src/Stryker.CLI/Stryker.CLI/packages.lock.json +++ b/src/Stryker.CLI/Stryker.CLI/packages.lock.json @@ -34,9 +34,9 @@ }, "YamlDotNet": { "type": "Direct", - "requested": "[13.3.1, )", - "resolved": "13.3.1", - "contentHash": "Q2dqDsb0xAlr092grgHk8/vTXI2snIiYM5ND3IXkgJDFIdPnqDYwYnlk+gwzSeRByDLhiSzTog8uT7xFwH68Zg==" + "requested": "[13.4.0, )", + "resolved": "13.4.0", + "contentHash": "XkqTRgpt/tkqX9sOKcdPAZLVMktR5sBFwt7aK/PP061k9yoUntr/Qc8o9KshjSte34WYTIuCrpBs1+LwR7dFdA==" }, "Buildalyzer.Logger": { "type": "Transitive", From d62fb5351e6e8aca712d1d95e2726797c3459f8c Mon Sep 17 00:00:00 2001 From: Petr Date: Fri, 29 Sep 2023 15:36:58 +0200 Subject: [PATCH 06/22] chore: F# range math (#2679) * F# range math * Windows x Linux * Up --- .../Helpers/RangeHelperTests.cs | 484 ++++++++++++++++++ .../TextSpanHelperTests.cs} | 10 +- src/Stryker.Core/Stryker.Core/FilePattern.cs | 2 +- .../Stryker.Core/Helpers/RangeHelper.cs | 190 +++++++ .../Stryker.Core/Helpers/TextSpanHelper.cs | 101 ++++ .../ProjectComponentsExtensions.cs | 94 +--- 6 files changed, 782 insertions(+), 99 deletions(-) create mode 100644 src/Stryker.Core/Stryker.Core.UnitTest/Helpers/RangeHelperTests.cs rename src/Stryker.Core/Stryker.Core.UnitTest/{ProjectComponents/ProjectComponentExtensionsTests.cs => Helpers/TextSpanHelperTests.cs} (94%) create mode 100644 src/Stryker.Core/Stryker.Core/Helpers/RangeHelper.cs create mode 100644 src/Stryker.Core/Stryker.Core/Helpers/TextSpanHelper.cs diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Helpers/RangeHelperTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Helpers/RangeHelperTests.cs new file mode 100644 index 0000000000..8b23f4a9c6 --- /dev/null +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Helpers/RangeHelperTests.cs @@ -0,0 +1,484 @@ +using System.Linq; +using FSharp.Compiler.Text; +using Shouldly; +using Stryker.Core.Helpers; +using Xunit; + +namespace Stryker.Core.UnitTest.Helpers +{ + public class RangeHelperTests : TestBase + { + [Fact] + public void Reduce_Empty() + { + var result = Enumerable.Empty().Reduce("test.fs"); + + result.ShouldBeEmpty(); + } + + [Fact] + public void Reduce_Hollow() + { + var range = GetRange((42, 42), (42, 42)); + + var result = new[] { range }.Reduce("test.fs"); + + result.ShouldBeEmpty(); + } + + [Fact] + public void Reduce_One() + { + var range = GetRange((0, 0), (42, 42)); + + var result = new[] { range }.Reduce("test.fs"); + + result.ShouldBe(new[] { range }); + } + + [Fact] + public void Reduce_TwoEqual() + { + var range1 = GetRange((0, 0), (42, 42)); + var range2 = GetRange((0, 0), (42, 42)); + + var result = new[] { range1, range2 }.Reduce("test.fs"); + + result.ShouldBe(new[] { range1 }); + } + + [Fact] + public void Reduce_TwoSequential() + { + var range1 = GetRange((0, 0), (11, 11)); + var range2 = GetRange((0, 0), (22, 22)); + var merged = GetRange((0, 0), (22, 22)); + + var result = new[] { range1, range2 }.Reduce("test.fs"); + + result.ShouldBe(new[] { merged }); + } + + [Fact] + public void Reduce_TwoIntersecting() + { + var range1 = GetRange((0, 0), (22, 22)); + var range2 = GetRange((11, 11), (33, 33)); + var intersection = GetRange((0, 0), (33, 33)); + + var result = new[] { range1, range2 }.Reduce("test.fs"); + + result.ShouldBe(new[] { intersection }); + } + + [Fact] + public void Reduce_TwoNotIntersecting() + { + var range1 = GetRange((0, 0), (11, 11)); + var range2 = GetRange((22, 22), (33, 33)); + + var result = new[] { range1, range2 }.Reduce("test.fs"); + + result.ShouldBe(new[] { range1, range2 }); + } + + [Fact] + public void Reduce_ThreeSequential() + { + var range1 = GetRange((0, 0), (11, 11)); + var range2 = GetRange((11, 11), (22, 22)); + var range3 = GetRange((22, 22), (33, 33)); + var merged = GetRange((0, 0), (33, 33)); + + var result = new[] { range1, range2, range3 }.Reduce("test.fs"); + + result.ShouldBe(new[] { merged }); + } + + [Fact] + public void Reduce_ThreePartiallyIntersecting() + { + var range1 = GetRange((0, 0), (22, 22)); + var range2 = GetRange((11, 11), (33, 33)); + var range3 = GetRange((44, 44), (55, 55)); + var intersection = GetRange((0, 0), (33, 33)); + + var result = new[] { range1, range2, range3 }.Reduce("test.fs"); + + result.ShouldBe(new[] { intersection, range3 }, ignoreOrder: true); + } + + [Fact] + public void RemoveOverlap_Empty() + { + var result = Enumerable.Empty().RemoveOverlap(Enumerable.Empty(), "test.fs"); + + result.ShouldBeEmpty(); + } + + [Fact] + public void RemoveOverlap_OverlappingPartiallyLeft() + { + var range1 = GetRange((0, 0), (22, 22)); + var range2 = GetRange((11, 11), (22, 22)); + var rangeWithoutOverlap = GetRange((0, 0), (11, 11)); + + var result = new[] { range1 }.RemoveOverlap(new[] { range2 }, "test.fs"); + + result.ShouldBe(new[] { rangeWithoutOverlap }); + } + + [Fact] + public void RemoveOverlap_OverlappingPartiallyRight() + { + var range1 = GetRange((0, 0), (22, 22)); + var range2 = GetRange((0, 0), (11, 11)); + var rangeWithoutOverlap = GetRange((11, 11), (22, 22)); + + var result = new[] { range1 }.RemoveOverlap(new[] { range2 }, "test.fs"); + + result.ShouldBe(new[] { rangeWithoutOverlap }); + } + + [Fact] + public void RemoveOverlap_OverlappingBySequentialRanges() + { + var range1 = GetRange((0, 0), (33, 33)); + var range2 = GetRange((0, 0), (11, 11)); + var range3 = GetRange((11, 11), (22, 22)); + var rangeWithoutOverlap = GetRange((22, 22), (33, 33)); + + var result = new[] { range1 }.RemoveOverlap(new[] { range2, range3 }, "test.fs"); + + result.ShouldBe(new[] { rangeWithoutOverlap }); + } + + [Fact] + public void RemoveOverlap_OverlappingByRangesFromSides() + { + var range1 = GetRange((0, 0), (33, 33)); + var range2 = GetRange((0, 0), (11, 11)); + var range3 = GetRange((22, 22), (33, 33)); + var rangeWithoutOverlap = GetRange((11, 11), (22, 22)); + + var result = new[] { range1 }.RemoveOverlap(new[] { range2, range3 }, "test.fs"); + + result.ShouldBe(new[] { rangeWithoutOverlap }); + } + + [Fact] + public void RemoveOverlap_OverlappingCompletely() + { + var range1 = GetRange((0, 0), (42, 42)); + var range2 = GetRange((0, 0), (42, 42)); + + var result = new[] { range1 }.RemoveOverlap(new[] { range2 }, "test.fs"); + + result.ShouldBeEmpty(); + } + + [Fact] + public void RemoveOverlap_OverlappingByBigger() + { + var range1 = GetRange((0, 0), (11, 11)); + var range2 = GetRange((0, 0), (44, 44)); + + var result = new[] { range1 }.RemoveOverlap(new[] { range2 }, "test.fs"); + + result.ShouldBeEmpty(); + } + + [Fact] + public void RemoveOverlap_CutInTheMiddle() + { + var range1 = GetRange((0, 0), (33, 33)); + var range2 = GetRange((11, 11), (22, 22)); + var leftPart = GetRange((0, 0), (11, 11)); + var rightPart = GetRange((22, 22), (33, 33)); + + var result = new[] { range1 }.RemoveOverlap(new[] { range2 }, "test.fs"); + + result.ShouldBe(new[] { leftPart, rightPart }); + } + + [Fact] + public void RemoveOverlap_NotOverlapping() + { + var range1 = GetRange((0, 0), (11, 11)); + var range2 = GetRange((22, 22), (33, 33)); + + var result = new[] { range1 }.RemoveOverlap(new[] { range2 }, "test.fs"); + + result.ShouldBe(new[] { range1 }); + } + + [Fact] + public void OverlapsWith_OverlappingLeft() + { + var range1 = GetRange((0, 0), (22, 22)); + var range2 = GetRange((11, 11), (33, 33)); + + range1.OverlapsWith(range2).ShouldBeTrue(); + } + + [Fact] + public void OverlapsWith_OverlappingRight() + { + var range1 = GetRange((11, 11), (33, 33)); + var range2 = GetRange((0, 0), (22, 22)); + + range1.OverlapsWith(range2).ShouldBeTrue(); + } + + [Fact] + public void OverlapsWith_OverlappingBetween() + { + var range1 = GetRange((0, 0), (33, 33)); + var range2 = GetRange((11, 11), (22, 22)); + + range1.OverlapsWith(range2).ShouldBeTrue(); + } + + [Fact] + public void OverlapsWith_NotOverlapping() + { + var range1 = GetRange((0, 0), (11, 11)); + var range2 = GetRange((22, 22), (33, 33)); + + range1.OverlapsWith(range2).ShouldBeFalse(); + } + + [Fact] + public void OverlapsWith_EmptyLeft() + { + var range1 = GetRange((0, 0), (42, 42)); + var range2 = Range.Zero; + + range1.OverlapsWith(range2).ShouldBeFalse(); + } + + [Fact] + public void OverlapsWith_EmptyRight() + { + var range1 = Range.Zero; + var range2 = GetRange((0, 0), (42, 42)); + + range1.OverlapsWith(range2).ShouldBeFalse(); + } + + [Fact] + public void OverlapsWith_EmptyBoth() + { + var range1 = Range.Zero; + var range2 = Range.Zero; + + range1.OverlapsWith(range2).ShouldBeFalse(); + } + + [Fact] + public void Overlap_Overlapping() + { + var range1 = GetRange((0, 0), (22, 22)); + var range2 = GetRange((11, 11), (33, 33)); + var overlap = GetRange((11, 11), (22, 22)); + + range1.Overlap(range2, "test.fs").ShouldBe(overlap); + } + + [Fact] + public void Overlap_Sequential() + { + var range1 = GetRange((0, 0), (11, 11)); + var range2 = GetRange((11, 11), (22, 22)); + + range1.Overlap(range2, "test.fs").ShouldBeNull(); + } + + [Fact] + public void Overlap_NotOverlapping() + { + var range1 = GetRange((0, 0), (11, 11)); + var range2 = GetRange((22, 22), (33, 33)); + + range1.Overlap(range2, "test.fs").ShouldBeNull(); + } + + [Fact] + public void Max_Greater() + { + var position1 = PositionModule.mkPos(42, 42); + var position2 = PositionModule.pos0; + + var actual = RangeHelper.Max(position1, position2); + + actual.ShouldBe(position1); + } + + [Fact] + public void Max_Equal() + { + var position1 = PositionModule.pos0; + var position2 = PositionModule.pos0; + + var actual = RangeHelper.Max(position1, position2); + + actual.ShouldBe(position1); + } + + [Fact] + public void Max_Less() + { + var position1 = PositionModule.pos0; + var position2 = PositionModule.mkPos(42, 42); + + var actual = RangeHelper.Max(position1, position2); + + actual.ShouldBe(position2); + } + + [Fact] + public void Min_Greater() + { + var position1 = PositionModule.mkPos(42, 42); + var position2 = PositionModule.pos0; + + var actual = RangeHelper.Min(position1, position2); + + actual.ShouldBe(position2); + } + + [Fact] + public void Min_Equal() + { + var position1 = PositionModule.pos0; + var position2 = PositionModule.pos0; + + var actual = RangeHelper.Min(position1, position2); + + actual.ShouldBe(position2); + } + + [Fact] + public void Min_Less() + { + var position1 = PositionModule.pos0; + var position2 = PositionModule.mkPos(42, 42); + + var actual = RangeHelper.Min(position1, position2); + + actual.ShouldBe(position1); + } + + [Fact] + public void IsEmpty_ZeroRange() + { + var range = Range.Zero; + + range.IsEmpty().ShouldBeTrue(); + } + + [Fact] + public void IsEmpty_HollowRange() + { + var range = GetRange((42, 42), (42, 42)); + + range.IsEmpty().ShouldBeTrue(); + } + + [Fact] + public void IsEmpty_NotEmptyRange() + { + var range = GetRange((0, 0), (42, 42)); + + range.IsEmpty().ShouldBeFalse(); + } + + [Fact] + public void IntersectsWith_Intersecting_Left() + { + var range1 = GetRange((0, 0), (22, 22)); + var range2 = GetRange((11, 11), (33, 33)); + + range1.IntersectsWith(range2).ShouldBeTrue(); + } + + [Fact] + public void IntersectsWith_IntersectingRight() + { + var range1 = GetRange((11, 11), (33, 33)); + var range2 = GetRange((0, 0), (22, 22)); + + range1.IntersectsWith(range2).ShouldBeTrue(); + } + + [Fact] + public void IntersectsWith_IntersectingBetween() + { + var range1 = GetRange((0, 0), (33, 33)); + var range2 = GetRange((11, 11), (22, 22)); + + range1.IntersectsWith(range2).ShouldBeTrue(); + } + + [Fact] + public void IntersectsWith_NoIntersection() + { + var range1 = GetRange((0, 0), (11, 11)); + var range2 = GetRange((22, 22), (33, 33)); + + range1.IntersectsWith(range2).ShouldBeFalse(); + } + + [Fact] + public void GetPosition_OneLine() + { + var text = "Line1"; + var index = 1; + var position = PositionModule.mkPos(0, 1); + + var result = RangeHelper.GetPosition(text, index); + + result.ShouldBe(position); + } + + [Fact] + public void GetPosition_OutOfBounds() + { + var text = "Line1"; + var index = 42; + var position = PositionModule.mkPos(0, 5); + + var result = RangeHelper.GetPosition(text, index); + + result.ShouldBe(position); + } + + [Fact] + public void GetIndex_OneLine() + { + var text = "Line1"; + var position = PositionModule.mkPos(0, 1); + + var result = RangeHelper.GetIndex(text, position); + + result.ShouldBe(1); + } + + [Fact] + public void GetIndex_OutOfBounds() + { + var text = "Line1"; + var position = PositionModule.mkPos(42, 42); + + var result = RangeHelper.GetIndex(text, position); + + result.ShouldBe(-1); + } + + private static Range GetRange((int Line, int Column) start, (int Line, int Column) end) => + RangeModule.mkRange( + "test.fs", + PositionModule.mkPos(start.Line, start.Column), + PositionModule.mkPos(end.Line, end.Column)); + } +} diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/ProjectComponentExtensionsTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Helpers/TextSpanHelperTests.cs similarity index 94% rename from src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/ProjectComponentExtensionsTests.cs rename to src/Stryker.Core/Stryker.Core.UnitTest/Helpers/TextSpanHelperTests.cs index 88c3551606..c52563b257 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/ProjectComponentExtensionsTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Helpers/TextSpanHelperTests.cs @@ -1,14 +1,14 @@ -using Microsoft.CodeAnalysis.Text; -using Shouldly; -using Stryker.Core.ProjectComponents; using System; using System.Collections.Generic; using System.Linq; +using Microsoft.CodeAnalysis.Text; +using Shouldly; +using Stryker.Core.Helpers; using Xunit; -namespace Stryker.Core.UnitTest.ProjectComponents +namespace Stryker.Core.UnitTest.Helpers { - public class ProjectComponentExtensionsTests : TestBase + public class TextSpanHelperTests : TestBase { [Theory] [InlineData(new int[0], new int[0])] diff --git a/src/Stryker.Core/Stryker.Core/FilePattern.cs b/src/Stryker.Core/Stryker.Core/FilePattern.cs index 49fe5facfa..040bae02c4 100644 --- a/src/Stryker.Core/Stryker.Core/FilePattern.cs +++ b/src/Stryker.Core/Stryker.Core/FilePattern.cs @@ -1,6 +1,6 @@ using DotNet.Globbing; using Microsoft.CodeAnalysis.Text; -using Stryker.Core.ProjectComponents; +using Stryker.Core.Helpers; using System; using System.Collections.Generic; using System.Linq; diff --git a/src/Stryker.Core/Stryker.Core/Helpers/RangeHelper.cs b/src/Stryker.Core/Stryker.Core/Helpers/RangeHelper.cs new file mode 100644 index 0000000000..e1b5875d52 --- /dev/null +++ b/src/Stryker.Core/Stryker.Core/Helpers/RangeHelper.cs @@ -0,0 +1,190 @@ +using System.Collections.Generic; +using System.Linq; +using FSharp.Compiler.Text; + +namespace Stryker.Core.Helpers +{ + public static class RangeHelper + { + /// + /// Reduces a set of ranges to the smallest set of ranges possible. + /// Two can be combined if they intersect. + /// + /// The set of s to reduce. + /// The reduced set. + public static IReadOnlyCollection Reduce(this IEnumerable ranges, string filePath) + { + var rangeList = new List(ranges); + var shouldContinue = true; + + while (shouldContinue) + { + shouldContinue = false; + + foreach (var current in rangeList) + { + // Check if any of the other ranges intersects with the current one + var other = rangeList.FirstOrDefault(s => !RangeModule.equals(s, current) && s.IntersectsWith(current)); + if (!RangeModule.equals(other, Range.Zero)) + { + // Remove the original ranges + rangeList.Remove(current); + rangeList.Remove(other); + + // Add the newly combined range. + rangeList.Add(FromBounds(filePath, Min(current.Start, other.Start), Max(current.End, other.End))); + + // We changed the list, so we have to restart the foreach. + shouldContinue = true; + break; + } + } + } + + return rangeList.Distinct().Where(x => !x.IsEmpty()).ToList(); + } + + /// + /// Removes all overlaps of two sets of and returns the resulting set. + /// + /// The first set. + /// The second set. + /// All ranges and part of ranges of that do not overlap with any ranges in . + public static IReadOnlyCollection RemoveOverlap(this IEnumerable left, IEnumerable right, string filePath) + { + var rangeList = new List(left); + var shouldContinue = true; + + while (shouldContinue) + { + shouldContinue = false; + + foreach (var current in rangeList) + { + // Check if any range overlaps the current range. + var other = right.FirstOrDefault(o => o.OverlapsWith(current)); + + if (!RangeModule.equals(other, Range.Zero)) + { + // Remove the current range add the new range(s). + rangeList.Remove(current); + rangeList.AddRange(RemoveOverlap(current, other)); + + // We changed the list, so we have to restart the foreach. + shouldContinue = true; + break; + } + } + } + + return rangeList; + + IReadOnlyCollection RemoveOverlap(Range current, Range other) + { + // The the current range is completely contained inside the other, nothing will be left. + if (RangeModule.rangeContainsRange(other, current)) + return System.Array.Empty(); + + // Check if there is any overlap. + var overlap = current.Overlap(other, filePath); + + if (!overlap.HasValue) + { + return new[] { current }; + } + + return new[] { FromBounds(filePath, current.Start, overlap.Value.Start), FromBounds(filePath, overlap.Value.End, current.End) }.Where(s => !s.IsEmpty()).ToList(); + } + } + + public static bool OverlapsWith(this Range range1, Range range2) + { + var overlapStart = Max(range1.Start, range2.Start); + var overlapEnd = Min(range1.End, range2.End); + + return PositionModule.posLt(overlapStart, overlapEnd); + } + + public static Range? Overlap(this Range range1, Range range2, string filePath) + { + var overlapStart = Max(range1.Start, range2.Start); + var overlapEnd = Min(range1.End, range2.End); + + return PositionModule.posLt(overlapStart, overlapEnd) + ? FromBounds(filePath, overlapStart, overlapEnd) + : null; + } + + public static Position Max(Position pos1, Position pos2) + => PositionModule.posGeq(pos1, pos2) ? pos1 : pos2; + + public static Position Min(Position pos1, Position pos2) + => PositionModule.posLt(pos1, pos2) ? pos1 : pos2; + + public static bool IsEmpty(this Range range) + => PositionModule.posEq(range.Start, range.End); + + public static bool IntersectsWith(this Range range1, Range range2) + => PositionModule.posGeq(range1.End, range2.Start) + && PositionModule.posGeq(range2.End, range1.Start); + + public static Position GetPosition(string text, int index) + { + var line = 0; + var col = 0; + + for (var i = 0; i < System.Math.Min(index, text.Length); i++) + { + // TODO: handle x-platform + if (text[i] == '\n') + { + line++; + col = 0; + } + else + { + col++; + } + } + + return PositionModule.mkPos(line, col); + } + + public static int GetIndex(string text, Position pos) + { + var line = 0; + var col = 0; + + for (var i = 0; i < text.Length; i++) + { + if (line == pos.Line && col == pos.Column) + { + return i; + } + + // TODO: handle x-platform + if (text[i] == '\n') + { + line++; + col = 0; + } + else + { + col++; + } + } + + return -1; + } + + public static Range FromBounds(string filePath, Position startPos, Position endPos) + => RangeModule.mkRange(filePath, startPos, endPos); + + public static Range FromBounds(string filePath, string text, int startIndex, int endIndex) + { + var startPos = GetPosition(text, startIndex); + var endPos = GetPosition(text, endIndex); + return RangeModule.mkRange(filePath, startPos, endPos); + } + } +} diff --git a/src/Stryker.Core/Stryker.Core/Helpers/TextSpanHelper.cs b/src/Stryker.Core/Stryker.Core/Helpers/TextSpanHelper.cs new file mode 100644 index 0000000000..2162865615 --- /dev/null +++ b/src/Stryker.Core/Stryker.Core/Helpers/TextSpanHelper.cs @@ -0,0 +1,101 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.CodeAnalysis.Text; + +namespace Stryker.Core.Helpers +{ + public static class TextSpanHelper + { + /// + /// Reduces a set of text spans to the smallest set of text spans possible. + /// Two can be combined if they intersect. + /// + /// The set of s to reduce. + /// The reduced set. + public static IReadOnlyCollection Reduce(this IEnumerable textSpans) + { + var spans = new List(textSpans); + var shouldContinue = true; + + while (shouldContinue) + { + shouldContinue = false; + + foreach (var current in spans) + { + // Check if any of the other spans intersects with the current one + var other = spans.FirstOrDefault(s => s != current && s.IntersectsWith(current)); + if (other != default) + { + // Remove the original spans + spans.Remove(current); + spans.Remove(other); + + // Add the newly combined span. + spans.Add(TextSpan.FromBounds(Math.Min(current.Start, other.Start), Math.Max(current.End, other.End))); + + // We changed the list, so we have to restart the foreach. + shouldContinue = true; + break; + } + } + } + + return spans.Distinct().Where(x => !x.IsEmpty).ToList(); + } + + /// + /// Removes all overlaps of two sets of and returns the resulting set. + /// + /// The first set. + /// The second set. + /// All spans and part of spans of that do not overlap with any span in . + public static IReadOnlyCollection RemoveOverlap(this IEnumerable left, IEnumerable right) + { + var spanList = new List(left); + var shouldContinue = true; + + while (shouldContinue) + { + shouldContinue = false; + + foreach (var current in spanList) + { + // Check if any span overlaps the current span. + var other = right.FirstOrDefault(o => o.OverlapsWith(current)); + + if (other != default) + { + // Remove the current span add the new span(s). + spanList.Remove(current); + spanList.AddRange(RemoveOverlap(current, other)); + + // We changed the list, so we have to restart the foreach. + shouldContinue = true; + break; + } + } + } + + return spanList; + + IReadOnlyCollection RemoveOverlap(TextSpan current, TextSpan other) + { + // The the current span is completely contained inside the other, nothing will be left. + if (other.Contains(current)) + return Array.Empty(); + + // Check if there is any overlap. + var overlap = current.Overlap(other); + + if (!overlap.HasValue) + { + return new[] { current }; + } + + return new[] { TextSpan.FromBounds(current.Start, overlap.Value.Start), TextSpan.FromBounds(overlap.Value.End, current.End) }.Where(s => !s.IsEmpty).ToList(); + } + } + } +} diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/ProjectComponentsExtensions.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/ProjectComponentsExtensions.cs index 6b8d7ef9df..d3b9686e9f 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/ProjectComponentsExtensions.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/ProjectComponentsExtensions.cs @@ -1,7 +1,6 @@ -using Microsoft.CodeAnalysis.Text; -using System; using System.Collections.Generic; using System.Linq; +using Stryker.Core.Helpers; namespace Stryker.Core.ProjectComponents { @@ -37,96 +36,5 @@ bool MatchesFilePattern(FilePattern pattern) => pattern.Glob.IsMatch(projectComponent.FullPath) || pattern.Glob.IsMatch(projectComponent.RelativePath); } - - /// - /// Reduces a set of text spans to the smallest set of text spans possible. - /// Two can be combined if they intersect. - /// - /// The set of s to reduce. - /// The reduced set. - public static IReadOnlyCollection Reduce(this IEnumerable textSpans) - { - var spans = new List(textSpans); - var shouldContinue = true; - - while (shouldContinue) - { - shouldContinue = false; - - foreach (var current in spans) - { - // Check if any of the other spans intersects with the current one - var other = spans.FirstOrDefault(s => s != current && s.IntersectsWith(current)); - if (other != default) - { - // Remove the original spans - spans.Remove(current); - spans.Remove(other); - - // Add the newly combined span. - spans.Add(TextSpan.FromBounds(Math.Min(current.Start, other.Start), Math.Max(current.End, other.End))); - - // We changed the list, so we have to restart the foreach. - shouldContinue = true; - break; - } - } - } - - return spans.Distinct().Where(x => !x.IsEmpty).ToList(); - } - - /// - /// Removes all overlaps of two sets of and returns the resulting set. - /// - /// The first set. - /// The second set. - /// All spans and part of spans of that do not overlap with any span in . - public static IReadOnlyCollection RemoveOverlap(this IEnumerable left, IEnumerable right) - { - var spanList = new List(left); - var shouldContinue = true; - - while (shouldContinue) - { - shouldContinue = false; - - foreach (var current in spanList) - { - // Check if any span overlaps the current span. - var other = right.FirstOrDefault(o => o.OverlapsWith(current)); - - if (other != default) - { - // Remove the current span add the new span(s). - spanList.Remove(current); - spanList.AddRange(RemoveOverlap(current, other)); - - // We changed the list, so we have to restart the foreach. - shouldContinue = true; - break; - } - } - } - - return spanList; - - IReadOnlyCollection RemoveOverlap(TextSpan current, TextSpan other) - { - // The the current span is completely contained inside the other, nothing will be left. - if (other.Contains(current)) - return Array.Empty(); - - // Check if there is any overlap. - var overlap = current.Overlap(other); - - if (!overlap.HasValue) - { - return new[] { current }; - } - - return new[] { TextSpan.FromBounds(current.Start, overlap.Value.Start), TextSpan.FromBounds(overlap.Value.End, current.End) }.Where(s => !s.IsEmpty).ToList(); - } - } } } From e495676ecf1ded75bfc6393d6a80e2956a03c9cd Mon Sep 17 00:00:00 2001 From: Petr Date: Fri, 29 Sep 2023 17:04:06 +0200 Subject: [PATCH 07/22] chore: Passing Stryker options to F# project components (#2680) Co-authored-by: Rouke Broersma --- .../Initialisation/FsharpProjectComponentsBuilder.cs | 5 ++++- .../Stryker.Core/Initialisation/InputFileResolver.cs | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/FsharpProjectComponentsBuilder.cs b/src/Stryker.Core/Stryker.Core/Initialisation/FsharpProjectComponentsBuilder.cs index 6ca5df381c..10d01ddda6 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/FsharpProjectComponentsBuilder.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/FsharpProjectComponentsBuilder.cs @@ -5,6 +5,7 @@ using Microsoft.Extensions.Logging; using Microsoft.FSharp.Control; using Stryker.Core.Exceptions; +using Stryker.Core.Options; using Stryker.Core.ProjectComponents; using Stryker.Core.ProjectComponents.SourceProjects; using System; @@ -19,12 +20,14 @@ namespace Stryker.Core.Initialisation internal class FsharpProjectComponentsBuilder : ProjectComponentsBuilder { private readonly SourceProjectInfo _projectInfo; + private readonly StrykerOptions _options; private readonly string[] _foldersToExclude; private readonly ILogger _logger; - public FsharpProjectComponentsBuilder(SourceProjectInfo projectInfo, string[] foldersToExclude, ILogger logger, IFileSystem fileSystem) : base(fileSystem) + public FsharpProjectComponentsBuilder(SourceProjectInfo projectInfo, StrykerOptions options, string[] foldersToExclude, ILogger logger, IFileSystem fileSystem) : base(fileSystem) { _projectInfo = projectInfo; + _options = options; _foldersToExclude = foldersToExclude; _logger = logger; } diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/InputFileResolver.cs b/src/Stryker.Core/Stryker.Core/Initialisation/InputFileResolver.cs index 7241c49f6a..6364301662 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/InputFileResolver.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/InputFileResolver.cs @@ -370,6 +370,7 @@ private ProjectComponentsBuilder GetProjectComponentBuilder( Language.Fsharp => new FsharpProjectComponentsBuilder( projectInfo, + options, _foldersToExclude, _logger, FileSystem), From 4696956393e22b924e9ba03361fdf51ee6dc30e5 Mon Sep 17 00:00:00 2001 From: Rouke Broersma Date: Fri, 29 Sep 2023 17:24:37 +0200 Subject: [PATCH 08/22] fix: Use solution file when it's available (#2690) * Use solution file when it's available * fix unit test * sonarqube --- .../TargetFrameworkResolutionTests.cs | 2 +- .../Initialisation/InputFileResolver.cs | 14 +++++------ .../Initialisation/ProjectFileReader.cs | 24 ++++++++----------- 3 files changed, 18 insertions(+), 22 deletions(-) diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/TargetFrameworkResolutionTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/TargetFrameworkResolutionTests.cs index e74c99e6b5..ca47e30a3b 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/TargetFrameworkResolutionTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/TargetFrameworkResolutionTests.cs @@ -33,7 +33,7 @@ public TargetFrameworkResolutionTests() analyzerResultsMock .Setup(m => m.GetEnumerator()) .Returns(() => _analyzerResults.GetEnumerator()); - buildalyzerProviderMock.Setup(x => x.Provide( It.IsAny())).Returns(analyzerManagerMock.Object); + buildalyzerProviderMock.Setup(x => x.Provide(It.IsAny(), It.IsAny())).Returns(analyzerManagerMock.Object); _projectFileReader = new ProjectFileReader(null, buildalyzerProviderMock.Object); } diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/InputFileResolver.cs b/src/Stryker.Core/Stryker.Core/Initialisation/InputFileResolver.cs index 6364301662..4ae8f821a7 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/InputFileResolver.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/InputFileResolver.cs @@ -57,7 +57,7 @@ public IReadOnlyCollection ResolveSourceProjectInfos(StrykerO } else { - testProjectFileNames = new List {FindTestProject(options.ProjectPath) }; + testProjectFileNames = new List { FindTestProject(options.ProjectPath) }; } var testProjects = testProjectFileNames.Select(testProjectFile => _projectFileReader.AnalyzeProject(testProjectFile, options.SolutionPath, options.TargetFramework)).ToList(); @@ -92,7 +92,7 @@ private static Dictionary> FindDependentProjects(IReadOn { // need to scan traverse dependencies // dependents contains the list of projects depending on each (non test) projects - var dependents = projectsUnderTest.ToDictionary(p=>p.ProjectFilePath, p => new HashSet(new []{p.ProjectFilePath})); + var dependents = projectsUnderTest.ToDictionary(p => p.ProjectFilePath, p => new HashSet(new[] { p.ProjectFilePath })); // register explicit dependencies foreach (var result in projectsUnderTest) { @@ -101,7 +101,7 @@ private static Dictionary> FindDependentProjects(IReadOn dependents[reference].Add(result.ProjectFilePath); } } - + // we need to dig recursively to find recursive dependencies, until none are discovered bool foundNewDependency; do @@ -127,8 +127,8 @@ private static Dictionary> FindDependentProjects(IReadOn private List AnalyzeSolution(StrykerOptions options) { - _logger.LogInformation("Identifying projects to mutate in {0}. This can take a while.", options.SolutionPath); - var manager = _projectFileReader.AnalyzeSolution(options.SolutionPath); + _logger.LogInformation("Identifying projects to mutate in {0}. This can take a while.", options.SolutionPath); + var manager = _projectFileReader.GetAnalyzerManager(options.SolutionPath); // build all projects var projectsAnalyzerResults = new ConcurrentBag(); @@ -171,7 +171,7 @@ private IReadOnlyCollection BuildProjectInfos(StrykerOptions var projectLogName = Path.GetRelativePath(Path.GetDirectoryName(options.SolutionPath), project.ProjectFilePath); var analyzerResultsForTestProjects = testProjects .Where(testProject => testProject.ProjectReferences.Any(reference => dependents[project.ProjectFilePath].Contains(reference))); - var relatedTestProjects = analyzerResultsForTestProjects.Select(p =>p.ProjectFilePath).ToList(); + var relatedTestProjects = analyzerResultsForTestProjects.Select(p => p.ProjectFilePath).ToList(); if (relatedTestProjects.Count > 0) { _logger.LogDebug("Matched {0} to {1} test projects:", projectLogName, relatedTestProjects.Count); @@ -305,7 +305,7 @@ internal string DetermineSourceProjectWithNameFilter(StrykerOptions options, IRe stringBuilder.Append("More than one project reference matched the given project filter ") .Append($"'{options.SourceProjectName}'") .AppendLine(", please specify the full name of the project reference."); - + } stringBuilder.Append(BuildReferenceChoice(projectReferences)); diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/ProjectFileReader.cs b/src/Stryker.Core/Stryker.Core/Initialisation/ProjectFileReader.cs index 4a44f7a36c..c7c6e5e344 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/ProjectFileReader.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/ProjectFileReader.cs @@ -16,7 +16,7 @@ IAnalyzerResult AnalyzeProject(string projectFilePath, string solutionFilePath, string targetFramework, string msBuildPath = null); - IAnalyzerManager AnalyzeSolution(string solutionPath); + IAnalyzerManager GetAnalyzerManager(string solutionFilePath = null); } /// @@ -39,13 +39,10 @@ public ProjectFileReader( _logger = ApplicationLogging.LoggerFactory.CreateLogger(); } - private IAnalyzerManager AnalyzerManager + public IAnalyzerManager GetAnalyzerManager(string solutionFilePath = null) { - get - { - _analyzerManager ??= _analyzerProvider.Provide(new AnalyzerManagerOptions{LogWriter = _buildalyzerLog}); - return _analyzerManager; - } + _analyzerManager ??= _analyzerProvider.Provide(solutionFilePath, new AnalyzerManagerOptions { LogWriter = _buildalyzerLog }); + return _analyzerManager; } public IAnalyzerResult AnalyzeProject(string projectFilePath, @@ -53,9 +50,8 @@ public IAnalyzerResult AnalyzeProject(string projectFilePath, string targetFramework, string msBuildPath = null) { - _logger.LogDebug("Analyzing project file {0}", projectFilePath); - var analyzerResult = GetProjectInfo(projectFilePath, targetFramework); + var analyzerResult = GetProjectInfo(projectFilePath, solutionFilePath, targetFramework); LogAnalyzerResult(analyzerResult); if (analyzerResult.Succeeded) @@ -67,7 +63,7 @@ public IAnalyzerResult AnalyzeProject(string projectFilePath, // buildalyzer failed to find restored packages, retry after nuget restore _logger.LogDebug("Project analyzer result not successful, restoring packages"); _nugetRestoreProcess.RestorePackages(solutionFilePath, msBuildPath); - analyzerResult = GetProjectInfo(projectFilePath, targetFramework); + analyzerResult = GetProjectInfo(projectFilePath, solutionFilePath, targetFramework); } else { @@ -78,16 +74,16 @@ public IAnalyzerResult AnalyzeProject(string projectFilePath, return analyzerResult; } - public IAnalyzerManager AnalyzeSolution(string solutionPath) => _analyzerProvider.Provide(solutionPath, new AnalyzerManagerOptions{LogWriter = _buildalyzerLog}); - /// /// Checks if project info is already present in solution projects. If not, analyze here. /// /// - private IAnalyzerResult GetProjectInfo(string projectFilePath, + private IAnalyzerResult GetProjectInfo( + string projectFilePath, + string solutionFilePath, string targetFramework) { - var analyzerResults = AnalyzerManager.GetProject(projectFilePath).Build(); + var analyzerResults = GetAnalyzerManager(solutionFilePath).GetProject(projectFilePath).Build(); return SelectAnalyzerResult(analyzerResults, targetFramework); } From 579f32a6a5b22426e05310c6024ccd296ec63205 Mon Sep 17 00:00:00 2001 From: Jack Steel Date: Fri, 29 Sep 2023 16:46:25 +0100 Subject: [PATCH 09/22] chore(compilation): Improve Error and Trace Logging (#2688) Add logs Co-authored-by: Rouke Broersma --- .../Compiling/CsharpCompilingProcess.cs | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/Stryker.Core/Stryker.Core/Compiling/CsharpCompilingProcess.cs b/src/Stryker.Core/Stryker.Core/Compiling/CsharpCompilingProcess.cs index 816e9013dd..06da3262d5 100644 --- a/src/Stryker.Core/Stryker.Core/Compiling/CsharpCompilingProcess.cs +++ b/src/Stryker.Core/Stryker.Core/Compiling/CsharpCompilingProcess.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; using System.IO; using System.Linq; @@ -74,6 +75,7 @@ public CompilingProcessResult Compile(IEnumerable syntaxTrees, Strea { _logger.LogError("Failed to build the mutated assembly due to unrecoverable error: {0}", emitResult.Diagnostics.First(diagnostic => diagnostic.Location == Location.None && diagnostic.Severity == DiagnosticSeverity.Error)); + DumpErrorDetails(emitResult.Diagnostics); throw new CompilationException("General Build Failure detected."); } @@ -154,7 +156,6 @@ private CSharpCompilation RunSourceGenerators(IAnalyzerResult analyzerResult, Co null, null), options: emitOptions); - LogEmitResult(emitResult); return (rollbackProcessResult, emitResult, retryCount+1); @@ -168,7 +169,7 @@ private void LogEmitResult(EmitResult result) foreach (var err in result.Diagnostics.Where(x => x.Severity is DiagnosticSeverity.Error)) { - _logger.LogDebug("{0}, {1}", err?.GetMessage() ?? "No message", err?.Location.SourceTree?.FilePath ?? "Unknown filepath"); + _logger.LogDebug("{ErrorMessage}, {ErrorLocation}", err?.GetMessage() ?? "No message", err?.Location?.ToString() ?? "Unknown filepath"); } } else @@ -177,6 +178,23 @@ private void LogEmitResult(EmitResult result) } } + private void DumpErrorDetails(IEnumerable diagnostics) + { + var message = $"An unrecoverable compilation error occurred:{Environment.NewLine}"; + var materializedDiagnostics = diagnostics.ToArray(); + if (!materializedDiagnostics.Any()) + { + message += "Unfortunately there is no more info available, good luck!"; + } + + foreach (var diagnostic in materializedDiagnostics) + { + message += $"{diagnostic.Id}: {diagnostic}{Environment.NewLine}"; + } + + _logger.LogTrace(message); + } + private static string ReadableNumber(int number) => number switch { 1 => "first", From 03f991307924b67d14791b7ee42d1f0f1c2c8717 Mon Sep 17 00:00:00 2001 From: Cyrille DUPUYDAUBY Date: Fri, 29 Sep 2023 19:11:05 +0200 Subject: [PATCH 10/22] fix: Remove usings from MutantControl (#2694) chore: remove usings from MutantControl Co-authored-by: Rouke Broersma --- .../InjectedHelpers/MutantControl.cs | 26 ++++++++----------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/src/Stryker.Core/Stryker.Core/InjectedHelpers/MutantControl.cs b/src/Stryker.Core/Stryker.Core/InjectedHelpers/MutantControl.cs index 4b445eb668..955c6f86fa 100644 --- a/src/Stryker.Core/Stryker.Core/InjectedHelpers/MutantControl.cs +++ b/src/Stryker.Core/Stryker.Core/InjectedHelpers/MutantControl.cs @@ -1,15 +1,11 @@ -using System; -using System.Collections.Generic; -using System.Text; - namespace Stryker { internal static class MutantControl { - private static List _coveredMutants; - private static List _coveredStaticdMutants; + private static System.Collections.Generic.List _coveredMutants; + private static System.Collections.Generic.List _coveredStaticdMutants; private static string envName; - private static Object _coverageLock = new Object(); + private static System.Object _coverageLock = new System.Object(); // this attribute will be set by the Stryker Data Collector before each test public static bool CaptureCoverage; @@ -28,21 +24,21 @@ public static void InitCoverage() public static void ResetCoverage() { - _coveredMutants = new List(); - _coveredStaticdMutants = new List(); + _coveredMutants = new System.Collections.Generic.List(); + _coveredStaticdMutants = new System.Collections.Generic.List(); } - public static IList[] GetCoverageData() + public static System.Collections.Generic.IList[] GetCoverageData() { - IList[] result = new IList[]{_coveredMutants, _coveredStaticdMutants}; + System.Collections.Generic.IList[] result = new System.Collections.Generic.IList[]{_coveredMutants, _coveredStaticdMutants}; ResetCoverage(); return result; } - private static void CurrentDomain_ProcessExit(object sender, EventArgs e) + private static void CurrentDomain_ProcessExit(object sender, System.EventArgs e) { - GC.KeepAlive(_coveredMutants); - GC.KeepAlive(_coveredStaticdMutants); + System.GC.KeepAlive(_coveredMutants); + System.GC.KeepAlive(_coveredStaticdMutants); } // check with: Stryker.MutantControl.IsActive(ID) @@ -55,7 +51,7 @@ public static bool IsActive(int id) } if (ActiveMutant == ActiveMutantNotInitValue) { - string environmentVariable = Environment.GetEnvironmentVariable("ActiveMutation"); + string environmentVariable = System.Environment.GetEnvironmentVariable("ActiveMutation"); if (string.IsNullOrEmpty(environmentVariable)) { ActiveMutant = -1; From b58ebe76355b6fbb3c68f47ca73255c7a5009138 Mon Sep 17 00:00:00 2001 From: Jack Steel Date: Wed, 4 Oct 2023 14:30:33 +0100 Subject: [PATCH 11/22] chore: Code quality improvements (#2696) * Use string builder in loop * Use find & handle other platform newlines * Use find * Fix duplicate message * Add more range tests * Improve range code --- .../Helpers/RangeHelperTests.cs | 72 ++++++++++++++++--- .../Compiling/CsharpCompilingProcess.cs | 11 +-- .../Stryker.Core/Helpers/RangeHelper.cs | 62 +++++++++------- .../Stryker.Core/Helpers/TextSpanHelper.cs | 2 +- 4 files changed, 104 insertions(+), 43 deletions(-) diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Helpers/RangeHelperTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Helpers/RangeHelperTests.cs index 8b23f4a9c6..fcdb406878 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Helpers/RangeHelperTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Helpers/RangeHelperTests.cs @@ -1,8 +1,11 @@ +using System; using System.Linq; using FSharp.Compiler.Text; using Shouldly; using Stryker.Core.Helpers; using Xunit; +using Range = FSharp.Compiler.Text.Range; + namespace Stryker.Core.UnitTest.Helpers { @@ -442,11 +445,38 @@ public void GetPosition_OneLine() } [Fact] - public void GetPosition_OutOfBounds() + public void GetPosition_NoContent() { - var text = "Line1"; + var text = ""; + var index = 0; + var position = PositionModule.mkPos(0, 0); + + var result = RangeHelper.GetPosition(text, index); + + result.ShouldBe(position); + } + + [Fact] + public void GetPosition_NoContent_OutOfBounds() + { + var text = ""; var index = 42; - var position = PositionModule.mkPos(0, 5); + var position = PositionModule.mkPos(0, 0); + + var result = RangeHelper.GetPosition(text, index); + + result.ShouldBe(position); + } + + [Theory] + [InlineData(1, 0, 1)] + [InlineData(4, 0, 4)] + [InlineData(7, 1, 2)] + [InlineData(9, 1, 4)] + public void GetPosition_MultipleLines(int index, int expectedRow, int expectedCol) + { + var text = $"Line1{Environment.NewLine}Line2"; + var position = PositionModule.mkPos(expectedRow, expectedCol); var result = RangeHelper.GetPosition(text, index); @@ -454,25 +484,45 @@ public void GetPosition_OutOfBounds() } [Fact] - public void GetIndex_OneLine() + public void GetPosition_OutOfBounds() { var text = "Line1"; - var position = PositionModule.mkPos(0, 1); + var index = 42; + var position = PositionModule.mkPos(0, 5); - var result = RangeHelper.GetIndex(text, position); + var result = RangeHelper.GetPosition(text, index); - result.ShouldBe(1); + result.ShouldBe(position); } [Fact] - public void GetIndex_OutOfBounds() + public void GetIndex_OneLine() => GetIndex("Line1", expectedIndex: 1, row: 0, col: 1); + + [Theory] + [InlineData(1, 0, 1)] + [InlineData(4, 0, 4)] + [InlineData(7, 1, 2)] + [InlineData(9, 1, 4)] + + public void GetIndex_MultipleLines(int expectedIndex, int row, int col) => GetIndex($"Line1{Environment.NewLine}Line2", expectedIndex, row, col); + + [Theory] + [InlineData(-1, 0, 42)] + [InlineData(-1, 1, 42)] + [InlineData(-1, 2, 0)] + [InlineData(-1, 2, 42)] + public void GetIndex_MultipleLines_OutOfBounds(int expectedIndex, int row, int col) => GetIndex($"Line1{Environment.NewLine}Line2", expectedIndex, row, col); + + [Fact] + public void GetIndex_OutOfBounds() => GetIndex("Line1", expectedIndex: -1, row: 42, col: 42); + + private static void GetIndex(string text, int expectedIndex, int row, int col) { - var text = "Line1"; - var position = PositionModule.mkPos(42, 42); + var position = PositionModule.mkPos(row, col); var result = RangeHelper.GetIndex(text, position); - result.ShouldBe(-1); + result.ShouldBe(expectedIndex); } private static Range GetRange((int Line, int Column) start, (int Line, int Column) end) => diff --git a/src/Stryker.Core/Stryker.Core/Compiling/CsharpCompilingProcess.cs b/src/Stryker.Core/Stryker.Core/Compiling/CsharpCompilingProcess.cs index 06da3262d5..792a6031e3 100644 --- a/src/Stryker.Core/Stryker.Core/Compiling/CsharpCompilingProcess.cs +++ b/src/Stryker.Core/Stryker.Core/Compiling/CsharpCompilingProcess.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; +using System.Text; using Buildalyzer; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; @@ -180,19 +181,21 @@ private void LogEmitResult(EmitResult result) private void DumpErrorDetails(IEnumerable diagnostics) { - var message = $"An unrecoverable compilation error occurred:{Environment.NewLine}"; + var messageBuilder = new StringBuilder(); var materializedDiagnostics = diagnostics.ToArray(); if (!materializedDiagnostics.Any()) { - message += "Unfortunately there is no more info available, good luck!"; + messageBuilder.Append("Unfortunately there is no more info available, good luck!"); } foreach (var diagnostic in materializedDiagnostics) { - message += $"{diagnostic.Id}: {diagnostic}{Environment.NewLine}"; + messageBuilder + .Append(Environment.NewLine) + .Append(diagnostic.Id).Append(": ").AppendLine(diagnostic.ToString()); } - _logger.LogTrace(message); + _logger.LogTrace("An unrecoverable compilation error occurred: {Diagnostics}", messageBuilder.ToString()); } private static string ReadableNumber(int number) => number switch diff --git a/src/Stryker.Core/Stryker.Core/Helpers/RangeHelper.cs b/src/Stryker.Core/Stryker.Core/Helpers/RangeHelper.cs index e1b5875d52..6ce39176fd 100644 --- a/src/Stryker.Core/Stryker.Core/Helpers/RangeHelper.cs +++ b/src/Stryker.Core/Stryker.Core/Helpers/RangeHelper.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.IO; using System.Linq; using FSharp.Compiler.Text; @@ -24,7 +25,7 @@ public static IReadOnlyCollection Reduce(this IEnumerable ranges, foreach (var current in rangeList) { // Check if any of the other ranges intersects with the current one - var other = rangeList.FirstOrDefault(s => !RangeModule.equals(s, current) && s.IntersectsWith(current)); + var other = rangeList.Find(s => !RangeModule.equals(s, current) && s.IntersectsWith(current)); if (!RangeModule.equals(other, Range.Zero)) { // Remove the original ranges @@ -131,47 +132,54 @@ public static bool IntersectsWith(this Range range1, Range range2) public static Position GetPosition(string text, int index) { var line = 0; - var col = 0; - for (var i = 0; i < System.Math.Min(index, text.Length); i++) + using var reader = new StringReader(text); + var currentIndex = 0; + do { - // TODO: handle x-platform - if (text[i] == '\n') + string? latestLineContent = reader.ReadLine(); + if (latestLineContent == null) break; + + var lengthOfThisLine = latestLineContent.Length; + var endOfLineIndex = currentIndex + lengthOfThisLine; + var indexIsOnThisLine = index <= endOfLineIndex && index >= currentIndex; + if (indexIsOnThisLine) { - line++; - col = 0; + var indexOnThisLine = index - currentIndex; + return PositionModule.mkPos(line, indexOnThisLine); } - else + + var thisWasTheLastLine = reader.Peek() == -1; + if (thisWasTheLastLine) { - col++; + return PositionModule.mkPos(line, lengthOfThisLine); } - } - return PositionModule.mkPos(line, col); + line++; + currentIndex += lengthOfThisLine; + } while (currentIndex < text.Length); + + return PositionModule.mkPos(0, 0); } public static int GetIndex(string text, Position pos) { - var line = 0; - var col = 0; - - for (var i = 0; i < text.Length; i++) + using var reader = new StringReader(text); + string? latestLineContent = ""; + var currentIndex = 0; + for (var line = 0; line <= pos.Line; ++line) { - if (line == pos.Line && col == pos.Column) + if (latestLineContent == null) { - return i; + break; } + currentIndex += latestLineContent.Length; + latestLineContent = reader.ReadLine(); + } - // TODO: handle x-platform - if (text[i] == '\n') - { - line++; - col = 0; - } - else - { - col++; - } + if (latestLineContent != null && pos.Column < latestLineContent.Length) + { + return currentIndex + pos.Column; } return -1; diff --git a/src/Stryker.Core/Stryker.Core/Helpers/TextSpanHelper.cs b/src/Stryker.Core/Stryker.Core/Helpers/TextSpanHelper.cs index 2162865615..52058976de 100644 --- a/src/Stryker.Core/Stryker.Core/Helpers/TextSpanHelper.cs +++ b/src/Stryker.Core/Stryker.Core/Helpers/TextSpanHelper.cs @@ -25,7 +25,7 @@ public static IReadOnlyCollection Reduce(this IEnumerable te foreach (var current in spans) { // Check if any of the other spans intersects with the current one - var other = spans.FirstOrDefault(s => s != current && s.IntersectsWith(current)); + var other = spans.Find(s => s != current && s.IntersectsWith(current)); if (other != default) { // Remove the original spans From 900c3bf5d04ff7162022e440534da92df112270a Mon Sep 17 00:00:00 2001 From: Max S Date: Wed, 4 Oct 2023 19:47:49 +0200 Subject: [PATCH 12/22] docs: add SAS configuration (#2676) (#2701) docs: add SAS configuration --- docs/configuration.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/configuration.md b/docs/configuration.md index 94350a5068..526c2a0ffc 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -568,7 +568,15 @@ Command line: `--azure-fileshare-sas "se=2022-08-25T14%3A27Z&sp=rwdl&spr=https&s Config file: `N/A` When using the azure file storage [provider](#baselineprovider-string) you must pass credentials for the fileshare to Stryker. -For authentication with the azure fileshare we support Shared Access Signatures. For more information on how to configure a SAS check the [Azure documentation](https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview). +For authentication with the azure fileshare we support Shared Access Signatures (SAS). + +The SAS should be configured with the following properties: + +Allowed services: `File` +Allowed resource types: `Container`, `Object` +Allowed permissions: `Read`, `Write`, `Create` + +For more information on how to configure a SAS check the [Azure documentation](https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview). ## Troubleshooting From d6d3a81bcd24e40c3bd5648e4c0e2610801b9dbc Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 5 Oct 2023 00:29:43 +0000 Subject: [PATCH 13/22] chore(deps): update dependency launchdarkly.eventsource to v5.1.0 (#2702) * chore(deps): update dependency launchdarkly.eventsource to v5.1.0 * Update package lock files --------- Co-authored-by: Renovatebot --- src/Directory.Packages.props | 2 +- .../Stryker.Core.UnitTest/packages.lock.json | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 4c5e94f243..c7da13c5d2 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -1,7 +1,7 @@ - + diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/packages.lock.json b/src/Stryker.Core/Stryker.Core.UnitTest/packages.lock.json index 91a159ddbe..b15e26a387 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/packages.lock.json +++ b/src/Stryker.Core/Stryker.Core.UnitTest/packages.lock.json @@ -28,11 +28,11 @@ }, "LaunchDarkly.EventSource": { "type": "Direct", - "requested": "[5.0.1, )", - "resolved": "5.0.1", - "contentHash": "DN44Ry5M4lyrjiF7LEu0Ijco7Wm8R7mJopN+giYsYjkQlszsXdFvm3POoehIDAOtL1HHl5bZvF9k9xK034u3IA==", + "requested": "[5.1.0, )", + "resolved": "5.1.0", + "contentHash": "PztDWiMvPWODx+kfBnCroZ8Lpya4nPc7ZO4TZysOogODbVXDDPDYrdcgVivCMgf4davhGrp61ekvZc+Uy1NYMA==", "dependencies": { - "LaunchDarkly.Logging": "[1.0.1, 3.0.0)" + "LaunchDarkly.Logging": "[2.0.0, 3.0.0)" } }, "Microsoft.NET.Test.Sdk": { @@ -145,10 +145,10 @@ }, "LaunchDarkly.Logging": { "type": "Transitive", - "resolved": "1.0.1", - "contentHash": "rWgD2CIB3rvhdgN4WkwIT9JQTK1SayubtmR4efhJis/fmlhi5J4roXtkvBs07C1mU/06farZWCXdF+KnCjdfjg==", + "resolved": "2.0.0", + "contentHash": "lsLKNqAZ7HIlkdTIrf4FetfRA1SUDE3WlaZQn79aSVkLjYWEhUhkDDK7hORGh4JoA3V2gXN+cIvJQax2uR/ijA==", "dependencies": { - "Microsoft.Extensions.Logging.Abstractions": "3.1.9" + "Microsoft.Extensions.Logging.Abstractions": "6.0.0" } }, "LibGit2Sharp.NativeBinaries": { From d98dd872eacbca40829d78f55f3e4ea382f5e0ae Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 5 Oct 2023 06:55:02 +0000 Subject: [PATCH 14/22] chore(deps): update dependency yamldotnet to v13.5.0 (#2703) * chore(deps): update dependency yamldotnet to v13.5.0 * Update package lock files --------- Co-authored-by: Renovatebot --- src/Directory.Packages.props | 2 +- src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json | 8 ++++---- src/Stryker.CLI/Stryker.CLI/packages.lock.json | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index c7da13c5d2..331603fa94 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -5,7 +5,7 @@ - + diff --git a/src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json b/src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json index f614cd4c03..9a88636b49 100644 --- a/src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json +++ b/src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json @@ -1616,7 +1616,7 @@ "dependencies": { "McMaster.Extensions.CommandLineUtils": "[4.1.0, )", "NuGet.Protocol": "[6.7.0, )", - "YamlDotNet": "[13.4.0, )", + "YamlDotNet": "[13.5.0, )", "stryker": "[3.10.0, )" } }, @@ -1917,9 +1917,9 @@ }, "YamlDotNet": { "type": "CentralTransitive", - "requested": "[13.4.0, )", - "resolved": "13.4.0", - "contentHash": "XkqTRgpt/tkqX9sOKcdPAZLVMktR5sBFwt7aK/PP061k9yoUntr/Qc8o9KshjSte34WYTIuCrpBs1+LwR7dFdA==" + "requested": "[13.5.0, )", + "resolved": "13.5.0", + "contentHash": "HnOdHXLkAWaR16MJqfwyc4hXlcAG5+0slr+UuaMIRwuEJ5FMegyzLX4gh+z96nrXO7QLISEKu59RTQPsrDBfAA==" } } } diff --git a/src/Stryker.CLI/Stryker.CLI/packages.lock.json b/src/Stryker.CLI/Stryker.CLI/packages.lock.json index 742e5cba65..930616ed33 100644 --- a/src/Stryker.CLI/Stryker.CLI/packages.lock.json +++ b/src/Stryker.CLI/Stryker.CLI/packages.lock.json @@ -34,9 +34,9 @@ }, "YamlDotNet": { "type": "Direct", - "requested": "[13.4.0, )", - "resolved": "13.4.0", - "contentHash": "XkqTRgpt/tkqX9sOKcdPAZLVMktR5sBFwt7aK/PP061k9yoUntr/Qc8o9KshjSte34WYTIuCrpBs1+LwR7dFdA==" + "requested": "[13.5.0, )", + "resolved": "13.5.0", + "contentHash": "HnOdHXLkAWaR16MJqfwyc4hXlcAG5+0slr+UuaMIRwuEJ5FMegyzLX4gh+z96nrXO7QLISEKu59RTQPsrDBfAA==" }, "Buildalyzer.Logger": { "type": "Transitive", From 48f9959c1623807dff1453c89612655b1149eb4f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 5 Oct 2023 10:55:35 +0000 Subject: [PATCH 15/22] chore(deps): update dependency yamldotnet to v13.5.1 (#2704) * chore(deps): update dependency yamldotnet to v13.5.1 * Update package lock files --------- Co-authored-by: Renovatebot --- src/Directory.Packages.props | 2 +- src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json | 8 ++++---- src/Stryker.CLI/Stryker.CLI/packages.lock.json | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 331603fa94..51ad34e004 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -5,7 +5,7 @@ - + diff --git a/src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json b/src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json index 9a88636b49..a49b74ccea 100644 --- a/src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json +++ b/src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json @@ -1616,7 +1616,7 @@ "dependencies": { "McMaster.Extensions.CommandLineUtils": "[4.1.0, )", "NuGet.Protocol": "[6.7.0, )", - "YamlDotNet": "[13.5.0, )", + "YamlDotNet": "[13.5.1, )", "stryker": "[3.10.0, )" } }, @@ -1917,9 +1917,9 @@ }, "YamlDotNet": { "type": "CentralTransitive", - "requested": "[13.5.0, )", - "resolved": "13.5.0", - "contentHash": "HnOdHXLkAWaR16MJqfwyc4hXlcAG5+0slr+UuaMIRwuEJ5FMegyzLX4gh+z96nrXO7QLISEKu59RTQPsrDBfAA==" + "requested": "[13.5.1, )", + "resolved": "13.5.1", + "contentHash": "NTE1bVQhmbm/znK84U2LcFNKY1IDlVgG8kvk9Nv1XbZSNRlapCaIzGWJpceIUs1dwtvxbtvHi9w2hVa97pdZbA==" } } } diff --git a/src/Stryker.CLI/Stryker.CLI/packages.lock.json b/src/Stryker.CLI/Stryker.CLI/packages.lock.json index 930616ed33..70e184cb18 100644 --- a/src/Stryker.CLI/Stryker.CLI/packages.lock.json +++ b/src/Stryker.CLI/Stryker.CLI/packages.lock.json @@ -34,9 +34,9 @@ }, "YamlDotNet": { "type": "Direct", - "requested": "[13.5.0, )", - "resolved": "13.5.0", - "contentHash": "HnOdHXLkAWaR16MJqfwyc4hXlcAG5+0slr+UuaMIRwuEJ5FMegyzLX4gh+z96nrXO7QLISEKu59RTQPsrDBfAA==" + "requested": "[13.5.1, )", + "resolved": "13.5.1", + "contentHash": "NTE1bVQhmbm/znK84U2LcFNKY1IDlVgG8kvk9Nv1XbZSNRlapCaIzGWJpceIUs1dwtvxbtvHi9w2hVa97pdZbA==" }, "Buildalyzer.Logger": { "type": "Transitive", From a0a14f327a0c83c8fea64455c39cc9e2d7e187fc Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 10 Oct 2023 17:39:52 +0000 Subject: [PATCH 16/22] chore(deps): update dependency yamldotnet to v13.7.0 (#2705) * chore(deps): update dependency yamldotnet to v13.7.0 * Update package lock files --------- Co-authored-by: Renovatebot --- src/Directory.Packages.props | 2 +- src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json | 8 ++++---- src/Stryker.CLI/Stryker.CLI/packages.lock.json | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 51ad34e004..64871a43e7 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -5,7 +5,7 @@ - + diff --git a/src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json b/src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json index a49b74ccea..17df50a37f 100644 --- a/src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json +++ b/src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json @@ -1616,7 +1616,7 @@ "dependencies": { "McMaster.Extensions.CommandLineUtils": "[4.1.0, )", "NuGet.Protocol": "[6.7.0, )", - "YamlDotNet": "[13.5.1, )", + "YamlDotNet": "[13.7.0, )", "stryker": "[3.10.0, )" } }, @@ -1917,9 +1917,9 @@ }, "YamlDotNet": { "type": "CentralTransitive", - "requested": "[13.5.1, )", - "resolved": "13.5.1", - "contentHash": "NTE1bVQhmbm/znK84U2LcFNKY1IDlVgG8kvk9Nv1XbZSNRlapCaIzGWJpceIUs1dwtvxbtvHi9w2hVa97pdZbA==" + "requested": "[13.7.0, )", + "resolved": "13.7.0", + "contentHash": "RKkoQSCyk/94N20SL3U15hWAqBVXHu+59upcPi8R2uhrcAalyVa4Y/vYdXQ7MXQ71Lut//DH0tLcYByAkGmXhA==" } } } diff --git a/src/Stryker.CLI/Stryker.CLI/packages.lock.json b/src/Stryker.CLI/Stryker.CLI/packages.lock.json index 70e184cb18..0cf1e34bf7 100644 --- a/src/Stryker.CLI/Stryker.CLI/packages.lock.json +++ b/src/Stryker.CLI/Stryker.CLI/packages.lock.json @@ -34,9 +34,9 @@ }, "YamlDotNet": { "type": "Direct", - "requested": "[13.5.1, )", - "resolved": "13.5.1", - "contentHash": "NTE1bVQhmbm/znK84U2LcFNKY1IDlVgG8kvk9Nv1XbZSNRlapCaIzGWJpceIUs1dwtvxbtvHi9w2hVa97pdZbA==" + "requested": "[13.7.0, )", + "resolved": "13.7.0", + "contentHash": "RKkoQSCyk/94N20SL3U15hWAqBVXHu+59upcPi8R2uhrcAalyVa4Y/vYdXQ7MXQ71Lut//DH0tLcYByAkGmXhA==" }, "Buildalyzer.Logger": { "type": "Transitive", From 037463236db06669a1e0282c6ed6d12c7815e742 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 13 Oct 2023 04:24:26 +0000 Subject: [PATCH 17/22] chore(deps): update xunit-dotnet monorepo (#2711) * chore(deps): update xunit-dotnet monorepo * Update package lock files --------- Co-authored-by: Renovatebot --- .../boolMutateTestApp.Test.fsproj | 4 +- .../Xamarin.Forms.Tests.csproj | 4 +- .../EmptyTestProject/EmptyTestProject.csproj | 4 +- .../EmptyTestProject/packages.lock.json | 44 ++++++++--------- .../ExtraProject.XUnit.csproj | 4 +- .../ExtraProject.XUnit/packages.lock.json | 47 ++++++++++--------- .../Library.FSharp.XUnit.fsproj | 4 +- .../Library.FSharp.XUnit/packages.lock.json | 44 ++++++++--------- .../NetCoreTestProject.XUnit.csproj | 4 +- .../packages.lock.json | 44 ++++++++--------- .../ValidationProject/Validation.csproj | 4 +- src/Directory.Packages.props | 4 +- .../Stryker.CLI.UnitTest/packages.lock.json | 44 ++++++++--------- .../Stryker.Core.UnitTest/packages.lock.json | 44 ++++++++--------- .../packages.lock.json | 44 ++++++++--------- 15 files changed, 173 insertions(+), 170 deletions(-) diff --git a/ExampleProjects/FsharpMutateTestApp/boolMutateTestApp.Test/boolMutateTestApp.Test.fsproj b/ExampleProjects/FsharpMutateTestApp/boolMutateTestApp.Test/boolMutateTestApp.Test.fsproj index c0ec082977..8bd05448a8 100644 --- a/ExampleProjects/FsharpMutateTestApp/boolMutateTestApp.Test/boolMutateTestApp.Test.fsproj +++ b/ExampleProjects/FsharpMutateTestApp/boolMutateTestApp.Test/boolMutateTestApp.Test.fsproj @@ -14,8 +14,8 @@ - - + + diff --git a/ExampleProjects/Xamarin.Forms/Xamarin.Forms.Tests/Xamarin.Forms.Tests.csproj b/ExampleProjects/Xamarin.Forms/Xamarin.Forms.Tests/Xamarin.Forms.Tests.csproj index f39facda97..48752d0d25 100644 --- a/ExampleProjects/Xamarin.Forms/Xamarin.Forms.Tests/Xamarin.Forms.Tests.csproj +++ b/ExampleProjects/Xamarin.Forms/Xamarin.Forms.Tests/Xamarin.Forms.Tests.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/integrationtest/TargetProjects/EmptyTestProject/EmptyTestProject.csproj b/integrationtest/TargetProjects/EmptyTestProject/EmptyTestProject.csproj index b93e8faeba..deadc68326 100644 --- a/integrationtest/TargetProjects/EmptyTestProject/EmptyTestProject.csproj +++ b/integrationtest/TargetProjects/EmptyTestProject/EmptyTestProject.csproj @@ -11,8 +11,8 @@ - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/integrationtest/TargetProjects/EmptyTestProject/packages.lock.json b/integrationtest/TargetProjects/EmptyTestProject/packages.lock.json index 147abd1643..80fda52a02 100644 --- a/integrationtest/TargetProjects/EmptyTestProject/packages.lock.json +++ b/integrationtest/TargetProjects/EmptyTestProject/packages.lock.json @@ -20,20 +20,20 @@ }, "xunit": { "type": "Direct", - "requested": "[2.5.1, )", - "resolved": "2.5.1", - "contentHash": "WJJ7Ruxv1INF4ySosVZ0fN1dGhzNBEdLLZoIVn4TPU8CbYgaxUebAL/VPaBneXGT3EDE2llsJ2cKzGkGeZSY4Q==", + "requested": "[2.5.2, )", + "resolved": "2.5.2", + "contentHash": "cClLEtMhn9H85jdZILz564FkBHOUP1/KmpColguzWpzXDY8cFRRZ2gW58ahdWBznz8UzRabAUqY+5vZKia+AmQ==", "dependencies": { - "xunit.analyzers": "1.3.0", - "xunit.assert": "2.5.1", - "xunit.core": "[2.5.1]" + "xunit.analyzers": "1.4.0", + "xunit.assert": "2.5.2", + "xunit.core": "[2.5.2]" } }, "xunit.runner.visualstudio": { "type": "Direct", - "requested": "[2.5.1, )", - "resolved": "2.5.1", - "contentHash": "W5dQj2tysIY6MHaidZyqyiR7MGFEk+FrvHRapFyhe11HuR4A6aFGSVi8txi+kkXdY9FDjXffU/1PkNzRX52Caw==" + "requested": "[2.5.3, )", + "resolved": "2.5.3", + "contentHash": "HFFL6O+QLEOfs555SqHii48ovVa4CqGYanY+B32BjLpPptdE+wEJmCFNXlLHdEOD5LYeayb9EroaUpydGpcybg==" }, "Microsoft.CodeCoverage": { "type": "Transitive", @@ -978,30 +978,30 @@ }, "xunit.analyzers": { "type": "Transitive", - "resolved": "1.3.0", - "contentHash": "gSk+8RC6UZ6Fzx1OHoB2bPyENeg3WHIeJhB/hb4oZNN0pW0dwOuplJay6OnqFIvW8T37re/RB4PWpEvayWIO1Q==" + "resolved": "1.4.0", + "contentHash": "7ljnTJfFjz5zK+Jf0h2dd2QOSO6UmFizXsojv/x4QX7TU5vEgtKZPk9RvpkiuUqg2bddtNZufBoKQalsi7djfA==" }, "xunit.assert": { "type": "Transitive", - "resolved": "2.5.1", - "contentHash": "eMvuz6PFdD3DDeaXkFVwMzNZ40zcRoM9Zz3siAyWgfiAucSNOWZnVgqC8hSHbdMd98Gy6o0yIYG6mq4Tg37rrQ==", + "resolved": "2.5.2", + "contentHash": "dZNLJWG5HfMAvWBub7eDZwOkP4xuXJj1TSC2AP3bjzIFVGb8rD8xWTvgXlRBXtgPgH+I4Y5hz2MBQrGqUxjDDg==", "dependencies": { "NETStandard.Library": "1.6.1" } }, "xunit.core": { "type": "Transitive", - "resolved": "2.5.1", - "contentHash": "Tzuz//XwPJYAmC9FBIwgBgo5gb2kSoppDwkisyYhq0wtwxhv+gOJwtqUgkgk8Hr19B616Zol03LkD18r2e4AxA==", + "resolved": "2.5.2", + "contentHash": "q1PBUBD1Zxbu5WvRfdpzjUHDzs9vr65gNptEGTQmXISXMXeMG9YPX29Z7oZB0wXSccUCtwQ9uQBd5bkaCMS7hQ==", "dependencies": { - "xunit.extensibility.core": "[2.5.1]", - "xunit.extensibility.execution": "[2.5.1]" + "xunit.extensibility.core": "[2.5.2]", + "xunit.extensibility.execution": "[2.5.2]" } }, "xunit.extensibility.core": { "type": "Transitive", - "resolved": "2.5.1", - "contentHash": "XGPiWP7D/KIY/fzdmU9gx7eDt0QD0IAWOy54LI+ckLZCqFMupIFochC3dHRxykuAz+L0nYvz6PxDdR2UcgNmDw==", + "resolved": "2.5.2", + "contentHash": "peV3Y8Pt3wNoIdHeeGClI4qKUeiEX0LuihAYqbAU0g99sidiPItMsUAURjkAoo3JqX5Lrsg+jiVukXp4Tijmfw==", "dependencies": { "NETStandard.Library": "1.6.1", "xunit.abstractions": "2.0.3" @@ -1009,11 +1009,11 @@ }, "xunit.extensibility.execution": { "type": "Transitive", - "resolved": "2.5.1", - "contentHash": "I5IUervdZoKLD66TUcqsJDXcB3ui9RxzKe0MQGzEi4Hsxkaoz0YylmvwqW2nd3nilyqqIAs0OUaZf/faKPxY6w==", + "resolved": "2.5.2", + "contentHash": "w3Q45Rvva0z1KPtXN5j2DjY9VgBCdWT0mkkr+dZKVyzBtIxnIywzvbEFLJix/dzHdE3XYDXbzh5GfLJHGCDTUg==", "dependencies": { "NETStandard.Library": "1.6.1", - "xunit.extensibility.core": "[2.5.1]" + "xunit.extensibility.core": "[2.5.2]" } }, "library": { diff --git a/integrationtest/TargetProjects/ExtraProject.XUnit/ExtraProject.XUnit.csproj b/integrationtest/TargetProjects/ExtraProject.XUnit/ExtraProject.XUnit.csproj index 1693530269..5ae36758eb 100644 --- a/integrationtest/TargetProjects/ExtraProject.XUnit/ExtraProject.XUnit.csproj +++ b/integrationtest/TargetProjects/ExtraProject.XUnit/ExtraProject.XUnit.csproj @@ -8,8 +8,8 @@ - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/integrationtest/TargetProjects/ExtraProject.XUnit/packages.lock.json b/integrationtest/TargetProjects/ExtraProject.XUnit/packages.lock.json index 0729a1c0e8..a71587c674 100644 --- a/integrationtest/TargetProjects/ExtraProject.XUnit/packages.lock.json +++ b/integrationtest/TargetProjects/ExtraProject.XUnit/packages.lock.json @@ -20,20 +20,23 @@ }, "xunit": { "type": "Direct", - "requested": "[2.5.1, )", - "resolved": "2.5.1", - "contentHash": "WJJ7Ruxv1INF4ySosVZ0fN1dGhzNBEdLLZoIVn4TPU8CbYgaxUebAL/VPaBneXGT3EDE2llsJ2cKzGkGeZSY4Q==", + "requested": "[2.5.2, )", + "resolved": "2.5.2", + "contentHash": "cClLEtMhn9H85jdZILz564FkBHOUP1/KmpColguzWpzXDY8cFRRZ2gW58ahdWBznz8UzRabAUqY+5vZKia+AmQ==", "dependencies": { - "xunit.analyzers": "1.3.0", - "xunit.assert": "2.5.1", - "xunit.core": "[2.5.1]" + "xunit.analyzers": "1.4.0", + "xunit.assert": "2.5.2", + "xunit.core": "[2.5.2]" } }, "xunit.runner.visualstudio": { "type": "Direct", - "requested": "[2.5.1, )", - "resolved": "2.5.1", - "contentHash": "W5dQj2tysIY6MHaidZyqyiR7MGFEk+FrvHRapFyhe11HuR4A6aFGSVi8txi+kkXdY9FDjXffU/1PkNzRX52Caw==" + "requested": "[2.5.3, )", + "resolved": "2.5.3", + "contentHash": "HFFL6O+QLEOfs555SqHii48ovVa4CqGYanY+B32BjLpPptdE+wEJmCFNXlLHdEOD5LYeayb9EroaUpydGpcybg==", + "dependencies": { + "Microsoft.TestPlatform.ObjectModel": "17.7.2" + } }, "Microsoft.CodeCoverage": { "type": "Transitive", @@ -978,30 +981,30 @@ }, "xunit.analyzers": { "type": "Transitive", - "resolved": "1.3.0", - "contentHash": "gSk+8RC6UZ6Fzx1OHoB2bPyENeg3WHIeJhB/hb4oZNN0pW0dwOuplJay6OnqFIvW8T37re/RB4PWpEvayWIO1Q==" + "resolved": "1.4.0", + "contentHash": "7ljnTJfFjz5zK+Jf0h2dd2QOSO6UmFizXsojv/x4QX7TU5vEgtKZPk9RvpkiuUqg2bddtNZufBoKQalsi7djfA==" }, "xunit.assert": { "type": "Transitive", - "resolved": "2.5.1", - "contentHash": "eMvuz6PFdD3DDeaXkFVwMzNZ40zcRoM9Zz3siAyWgfiAucSNOWZnVgqC8hSHbdMd98Gy6o0yIYG6mq4Tg37rrQ==", + "resolved": "2.5.2", + "contentHash": "dZNLJWG5HfMAvWBub7eDZwOkP4xuXJj1TSC2AP3bjzIFVGb8rD8xWTvgXlRBXtgPgH+I4Y5hz2MBQrGqUxjDDg==", "dependencies": { "NETStandard.Library": "1.6.1" } }, "xunit.core": { "type": "Transitive", - "resolved": "2.5.1", - "contentHash": "Tzuz//XwPJYAmC9FBIwgBgo5gb2kSoppDwkisyYhq0wtwxhv+gOJwtqUgkgk8Hr19B616Zol03LkD18r2e4AxA==", + "resolved": "2.5.2", + "contentHash": "q1PBUBD1Zxbu5WvRfdpzjUHDzs9vr65gNptEGTQmXISXMXeMG9YPX29Z7oZB0wXSccUCtwQ9uQBd5bkaCMS7hQ==", "dependencies": { - "xunit.extensibility.core": "[2.5.1]", - "xunit.extensibility.execution": "[2.5.1]" + "xunit.extensibility.core": "[2.5.2]", + "xunit.extensibility.execution": "[2.5.2]" } }, "xunit.extensibility.core": { "type": "Transitive", - "resolved": "2.5.1", - "contentHash": "XGPiWP7D/KIY/fzdmU9gx7eDt0QD0IAWOy54LI+ckLZCqFMupIFochC3dHRxykuAz+L0nYvz6PxDdR2UcgNmDw==", + "resolved": "2.5.2", + "contentHash": "peV3Y8Pt3wNoIdHeeGClI4qKUeiEX0LuihAYqbAU0g99sidiPItMsUAURjkAoo3JqX5Lrsg+jiVukXp4Tijmfw==", "dependencies": { "NETStandard.Library": "1.6.1", "xunit.abstractions": "2.0.3" @@ -1009,11 +1012,11 @@ }, "xunit.extensibility.execution": { "type": "Transitive", - "resolved": "2.5.1", - "contentHash": "I5IUervdZoKLD66TUcqsJDXcB3ui9RxzKe0MQGzEi4Hsxkaoz0YylmvwqW2nd3nilyqqIAs0OUaZf/faKPxY6w==", + "resolved": "2.5.2", + "contentHash": "w3Q45Rvva0z1KPtXN5j2DjY9VgBCdWT0mkkr+dZKVyzBtIxnIywzvbEFLJix/dzHdE3XYDXbzh5GfLJHGCDTUg==", "dependencies": { "NETStandard.Library": "1.6.1", - "xunit.extensibility.core": "[2.5.1]" + "xunit.extensibility.core": "[2.5.2]" } }, "extraproject": { diff --git a/integrationtest/TargetProjects/Library.FSharp.XUnit/Library.FSharp.XUnit.fsproj b/integrationtest/TargetProjects/Library.FSharp.XUnit/Library.FSharp.XUnit.fsproj index f2d4ca9457..f193136a4d 100644 --- a/integrationtest/TargetProjects/Library.FSharp.XUnit/Library.FSharp.XUnit.fsproj +++ b/integrationtest/TargetProjects/Library.FSharp.XUnit/Library.FSharp.XUnit.fsproj @@ -15,8 +15,8 @@ - - + + diff --git a/integrationtest/TargetProjects/Library.FSharp.XUnit/packages.lock.json b/integrationtest/TargetProjects/Library.FSharp.XUnit/packages.lock.json index fb15560b09..087a153e05 100644 --- a/integrationtest/TargetProjects/Library.FSharp.XUnit/packages.lock.json +++ b/integrationtest/TargetProjects/Library.FSharp.XUnit/packages.lock.json @@ -20,20 +20,20 @@ }, "xunit": { "type": "Direct", - "requested": "[2.5.1, )", - "resolved": "2.5.1", - "contentHash": "WJJ7Ruxv1INF4ySosVZ0fN1dGhzNBEdLLZoIVn4TPU8CbYgaxUebAL/VPaBneXGT3EDE2llsJ2cKzGkGeZSY4Q==", + "requested": "[2.5.2, )", + "resolved": "2.5.2", + "contentHash": "cClLEtMhn9H85jdZILz564FkBHOUP1/KmpColguzWpzXDY8cFRRZ2gW58ahdWBznz8UzRabAUqY+5vZKia+AmQ==", "dependencies": { - "xunit.analyzers": "1.3.0", - "xunit.assert": "2.5.1", - "xunit.core": "[2.5.1]" + "xunit.analyzers": "1.4.0", + "xunit.assert": "2.5.2", + "xunit.core": "[2.5.2]" } }, "xunit.runner.visualstudio": { "type": "Direct", - "requested": "[2.5.1, )", - "resolved": "2.5.1", - "contentHash": "W5dQj2tysIY6MHaidZyqyiR7MGFEk+FrvHRapFyhe11HuR4A6aFGSVi8txi+kkXdY9FDjXffU/1PkNzRX52Caw==" + "requested": "[2.5.3, )", + "resolved": "2.5.3", + "contentHash": "HFFL6O+QLEOfs555SqHii48ovVa4CqGYanY+B32BjLpPptdE+wEJmCFNXlLHdEOD5LYeayb9EroaUpydGpcybg==" }, "Microsoft.CodeCoverage": { "type": "Transitive", @@ -978,30 +978,30 @@ }, "xunit.analyzers": { "type": "Transitive", - "resolved": "1.3.0", - "contentHash": "gSk+8RC6UZ6Fzx1OHoB2bPyENeg3WHIeJhB/hb4oZNN0pW0dwOuplJay6OnqFIvW8T37re/RB4PWpEvayWIO1Q==" + "resolved": "1.4.0", + "contentHash": "7ljnTJfFjz5zK+Jf0h2dd2QOSO6UmFizXsojv/x4QX7TU5vEgtKZPk9RvpkiuUqg2bddtNZufBoKQalsi7djfA==" }, "xunit.assert": { "type": "Transitive", - "resolved": "2.5.1", - "contentHash": "eMvuz6PFdD3DDeaXkFVwMzNZ40zcRoM9Zz3siAyWgfiAucSNOWZnVgqC8hSHbdMd98Gy6o0yIYG6mq4Tg37rrQ==", + "resolved": "2.5.2", + "contentHash": "dZNLJWG5HfMAvWBub7eDZwOkP4xuXJj1TSC2AP3bjzIFVGb8rD8xWTvgXlRBXtgPgH+I4Y5hz2MBQrGqUxjDDg==", "dependencies": { "NETStandard.Library": "1.6.1" } }, "xunit.core": { "type": "Transitive", - "resolved": "2.5.1", - "contentHash": "Tzuz//XwPJYAmC9FBIwgBgo5gb2kSoppDwkisyYhq0wtwxhv+gOJwtqUgkgk8Hr19B616Zol03LkD18r2e4AxA==", + "resolved": "2.5.2", + "contentHash": "q1PBUBD1Zxbu5WvRfdpzjUHDzs9vr65gNptEGTQmXISXMXeMG9YPX29Z7oZB0wXSccUCtwQ9uQBd5bkaCMS7hQ==", "dependencies": { - "xunit.extensibility.core": "[2.5.1]", - "xunit.extensibility.execution": "[2.5.1]" + "xunit.extensibility.core": "[2.5.2]", + "xunit.extensibility.execution": "[2.5.2]" } }, "xunit.extensibility.core": { "type": "Transitive", - "resolved": "2.5.1", - "contentHash": "XGPiWP7D/KIY/fzdmU9gx7eDt0QD0IAWOy54LI+ckLZCqFMupIFochC3dHRxykuAz+L0nYvz6PxDdR2UcgNmDw==", + "resolved": "2.5.2", + "contentHash": "peV3Y8Pt3wNoIdHeeGClI4qKUeiEX0LuihAYqbAU0g99sidiPItMsUAURjkAoo3JqX5Lrsg+jiVukXp4Tijmfw==", "dependencies": { "NETStandard.Library": "1.6.1", "xunit.abstractions": "2.0.3" @@ -1009,11 +1009,11 @@ }, "xunit.extensibility.execution": { "type": "Transitive", - "resolved": "2.5.1", - "contentHash": "I5IUervdZoKLD66TUcqsJDXcB3ui9RxzKe0MQGzEi4Hsxkaoz0YylmvwqW2nd3nilyqqIAs0OUaZf/faKPxY6w==", + "resolved": "2.5.2", + "contentHash": "w3Q45Rvva0z1KPtXN5j2DjY9VgBCdWT0mkkr+dZKVyzBtIxnIywzvbEFLJix/dzHdE3XYDXbzh5GfLJHGCDTUg==", "dependencies": { "NETStandard.Library": "1.6.1", - "xunit.extensibility.core": "[2.5.1]" + "xunit.extensibility.core": "[2.5.2]" } }, "library.fsharp": { diff --git a/integrationtest/TargetProjects/NetCoreTestProject.XUnit/NetCoreTestProject.XUnit.csproj b/integrationtest/TargetProjects/NetCoreTestProject.XUnit/NetCoreTestProject.XUnit.csproj index 802ecc0a37..7d437422b4 100644 --- a/integrationtest/TargetProjects/NetCoreTestProject.XUnit/NetCoreTestProject.XUnit.csproj +++ b/integrationtest/TargetProjects/NetCoreTestProject.XUnit/NetCoreTestProject.XUnit.csproj @@ -10,8 +10,8 @@ - - + + diff --git a/integrationtest/TargetProjects/NetCoreTestProject.XUnit/packages.lock.json b/integrationtest/TargetProjects/NetCoreTestProject.XUnit/packages.lock.json index e5e0927213..9efc4d67d1 100644 --- a/integrationtest/TargetProjects/NetCoreTestProject.XUnit/packages.lock.json +++ b/integrationtest/TargetProjects/NetCoreTestProject.XUnit/packages.lock.json @@ -14,20 +14,20 @@ }, "xunit": { "type": "Direct", - "requested": "[2.5.1, )", - "resolved": "2.5.1", - "contentHash": "WJJ7Ruxv1INF4ySosVZ0fN1dGhzNBEdLLZoIVn4TPU8CbYgaxUebAL/VPaBneXGT3EDE2llsJ2cKzGkGeZSY4Q==", + "requested": "[2.5.2, )", + "resolved": "2.5.2", + "contentHash": "cClLEtMhn9H85jdZILz564FkBHOUP1/KmpColguzWpzXDY8cFRRZ2gW58ahdWBznz8UzRabAUqY+5vZKia+AmQ==", "dependencies": { - "xunit.analyzers": "1.3.0", - "xunit.assert": "2.5.1", - "xunit.core": "[2.5.1]" + "xunit.analyzers": "1.4.0", + "xunit.assert": "2.5.2", + "xunit.core": "[2.5.2]" } }, "xunit.runner.visualstudio": { "type": "Direct", - "requested": "[2.5.1, )", - "resolved": "2.5.1", - "contentHash": "W5dQj2tysIY6MHaidZyqyiR7MGFEk+FrvHRapFyhe11HuR4A6aFGSVi8txi+kkXdY9FDjXffU/1PkNzRX52Caw==" + "requested": "[2.5.3, )", + "resolved": "2.5.3", + "contentHash": "HFFL6O+QLEOfs555SqHii48ovVa4CqGYanY+B32BjLpPptdE+wEJmCFNXlLHdEOD5LYeayb9EroaUpydGpcybg==" }, "Microsoft.CodeCoverage": { "type": "Transitive", @@ -972,30 +972,30 @@ }, "xunit.analyzers": { "type": "Transitive", - "resolved": "1.3.0", - "contentHash": "gSk+8RC6UZ6Fzx1OHoB2bPyENeg3WHIeJhB/hb4oZNN0pW0dwOuplJay6OnqFIvW8T37re/RB4PWpEvayWIO1Q==" + "resolved": "1.4.0", + "contentHash": "7ljnTJfFjz5zK+Jf0h2dd2QOSO6UmFizXsojv/x4QX7TU5vEgtKZPk9RvpkiuUqg2bddtNZufBoKQalsi7djfA==" }, "xunit.assert": { "type": "Transitive", - "resolved": "2.5.1", - "contentHash": "eMvuz6PFdD3DDeaXkFVwMzNZ40zcRoM9Zz3siAyWgfiAucSNOWZnVgqC8hSHbdMd98Gy6o0yIYG6mq4Tg37rrQ==", + "resolved": "2.5.2", + "contentHash": "dZNLJWG5HfMAvWBub7eDZwOkP4xuXJj1TSC2AP3bjzIFVGb8rD8xWTvgXlRBXtgPgH+I4Y5hz2MBQrGqUxjDDg==", "dependencies": { "NETStandard.Library": "1.6.1" } }, "xunit.core": { "type": "Transitive", - "resolved": "2.5.1", - "contentHash": "Tzuz//XwPJYAmC9FBIwgBgo5gb2kSoppDwkisyYhq0wtwxhv+gOJwtqUgkgk8Hr19B616Zol03LkD18r2e4AxA==", + "resolved": "2.5.2", + "contentHash": "q1PBUBD1Zxbu5WvRfdpzjUHDzs9vr65gNptEGTQmXISXMXeMG9YPX29Z7oZB0wXSccUCtwQ9uQBd5bkaCMS7hQ==", "dependencies": { - "xunit.extensibility.core": "[2.5.1]", - "xunit.extensibility.execution": "[2.5.1]" + "xunit.extensibility.core": "[2.5.2]", + "xunit.extensibility.execution": "[2.5.2]" } }, "xunit.extensibility.core": { "type": "Transitive", - "resolved": "2.5.1", - "contentHash": "XGPiWP7D/KIY/fzdmU9gx7eDt0QD0IAWOy54LI+ckLZCqFMupIFochC3dHRxykuAz+L0nYvz6PxDdR2UcgNmDw==", + "resolved": "2.5.2", + "contentHash": "peV3Y8Pt3wNoIdHeeGClI4qKUeiEX0LuihAYqbAU0g99sidiPItMsUAURjkAoo3JqX5Lrsg+jiVukXp4Tijmfw==", "dependencies": { "NETStandard.Library": "1.6.1", "xunit.abstractions": "2.0.3" @@ -1003,11 +1003,11 @@ }, "xunit.extensibility.execution": { "type": "Transitive", - "resolved": "2.5.1", - "contentHash": "I5IUervdZoKLD66TUcqsJDXcB3ui9RxzKe0MQGzEi4Hsxkaoz0YylmvwqW2nd3nilyqqIAs0OUaZf/faKPxY6w==", + "resolved": "2.5.2", + "contentHash": "w3Q45Rvva0z1KPtXN5j2DjY9VgBCdWT0mkkr+dZKVyzBtIxnIywzvbEFLJix/dzHdE3XYDXbzh5GfLJHGCDTUg==", "dependencies": { "NETStandard.Library": "1.6.1", - "xunit.extensibility.core": "[2.5.1]" + "xunit.extensibility.core": "[2.5.2]" } }, "library": { diff --git a/integrationtest/ValidationProject/Validation.csproj b/integrationtest/ValidationProject/Validation.csproj index 1ad1581010..c55d100b2f 100644 --- a/integrationtest/ValidationProject/Validation.csproj +++ b/integrationtest/ValidationProject/Validation.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 64871a43e7..d9ab944eec 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -38,8 +38,8 @@ - - + + diff --git a/src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json b/src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json index 17df50a37f..c80584b841 100644 --- a/src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json +++ b/src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json @@ -77,20 +77,20 @@ }, "xunit": { "type": "Direct", - "requested": "[2.5.1, )", - "resolved": "2.5.1", - "contentHash": "WJJ7Ruxv1INF4ySosVZ0fN1dGhzNBEdLLZoIVn4TPU8CbYgaxUebAL/VPaBneXGT3EDE2llsJ2cKzGkGeZSY4Q==", + "requested": "[2.5.2, )", + "resolved": "2.5.2", + "contentHash": "cClLEtMhn9H85jdZILz564FkBHOUP1/KmpColguzWpzXDY8cFRRZ2gW58ahdWBznz8UzRabAUqY+5vZKia+AmQ==", "dependencies": { - "xunit.analyzers": "1.3.0", - "xunit.assert": "2.5.1", - "xunit.core": "[2.5.1]" + "xunit.analyzers": "1.4.0", + "xunit.assert": "2.5.2", + "xunit.core": "[2.5.2]" } }, "xunit.runner.visualstudio": { "type": "Direct", - "requested": "[2.5.1, )", - "resolved": "2.5.1", - "contentHash": "W5dQj2tysIY6MHaidZyqyiR7MGFEk+FrvHRapFyhe11HuR4A6aFGSVi8txi+kkXdY9FDjXffU/1PkNzRX52Caw==" + "requested": "[2.5.3, )", + "resolved": "2.5.3", + "contentHash": "HFFL6O+QLEOfs555SqHii48ovVa4CqGYanY+B32BjLpPptdE+wEJmCFNXlLHdEOD5LYeayb9EroaUpydGpcybg==" }, "Buildalyzer.Logger": { "type": "Transitive", @@ -1573,30 +1573,30 @@ }, "xunit.analyzers": { "type": "Transitive", - "resolved": "1.3.0", - "contentHash": "gSk+8RC6UZ6Fzx1OHoB2bPyENeg3WHIeJhB/hb4oZNN0pW0dwOuplJay6OnqFIvW8T37re/RB4PWpEvayWIO1Q==" + "resolved": "1.4.0", + "contentHash": "7ljnTJfFjz5zK+Jf0h2dd2QOSO6UmFizXsojv/x4QX7TU5vEgtKZPk9RvpkiuUqg2bddtNZufBoKQalsi7djfA==" }, "xunit.assert": { "type": "Transitive", - "resolved": "2.5.1", - "contentHash": "eMvuz6PFdD3DDeaXkFVwMzNZ40zcRoM9Zz3siAyWgfiAucSNOWZnVgqC8hSHbdMd98Gy6o0yIYG6mq4Tg37rrQ==", + "resolved": "2.5.2", + "contentHash": "dZNLJWG5HfMAvWBub7eDZwOkP4xuXJj1TSC2AP3bjzIFVGb8rD8xWTvgXlRBXtgPgH+I4Y5hz2MBQrGqUxjDDg==", "dependencies": { "NETStandard.Library": "1.6.1" } }, "xunit.core": { "type": "Transitive", - "resolved": "2.5.1", - "contentHash": "Tzuz//XwPJYAmC9FBIwgBgo5gb2kSoppDwkisyYhq0wtwxhv+gOJwtqUgkgk8Hr19B616Zol03LkD18r2e4AxA==", + "resolved": "2.5.2", + "contentHash": "q1PBUBD1Zxbu5WvRfdpzjUHDzs9vr65gNptEGTQmXISXMXeMG9YPX29Z7oZB0wXSccUCtwQ9uQBd5bkaCMS7hQ==", "dependencies": { - "xunit.extensibility.core": "[2.5.1]", - "xunit.extensibility.execution": "[2.5.1]" + "xunit.extensibility.core": "[2.5.2]", + "xunit.extensibility.execution": "[2.5.2]" } }, "xunit.extensibility.core": { "type": "Transitive", - "resolved": "2.5.1", - "contentHash": "XGPiWP7D/KIY/fzdmU9gx7eDt0QD0IAWOy54LI+ckLZCqFMupIFochC3dHRxykuAz+L0nYvz6PxDdR2UcgNmDw==", + "resolved": "2.5.2", + "contentHash": "peV3Y8Pt3wNoIdHeeGClI4qKUeiEX0LuihAYqbAU0g99sidiPItMsUAURjkAoo3JqX5Lrsg+jiVukXp4Tijmfw==", "dependencies": { "NETStandard.Library": "1.6.1", "xunit.abstractions": "2.0.3" @@ -1604,11 +1604,11 @@ }, "xunit.extensibility.execution": { "type": "Transitive", - "resolved": "2.5.1", - "contentHash": "I5IUervdZoKLD66TUcqsJDXcB3ui9RxzKe0MQGzEi4Hsxkaoz0YylmvwqW2nd3nilyqqIAs0OUaZf/faKPxY6w==", + "resolved": "2.5.2", + "contentHash": "w3Q45Rvva0z1KPtXN5j2DjY9VgBCdWT0mkkr+dZKVyzBtIxnIywzvbEFLJix/dzHdE3XYDXbzh5GfLJHGCDTUg==", "dependencies": { "NETStandard.Library": "1.6.1", - "xunit.extensibility.core": "[2.5.1]" + "xunit.extensibility.core": "[2.5.2]" } }, "dotnet-stryker": { diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/packages.lock.json b/src/Stryker.Core/Stryker.Core.UnitTest/packages.lock.json index b15e26a387..6ceeb4e934 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/packages.lock.json +++ b/src/Stryker.Core/Stryker.Core.UnitTest/packages.lock.json @@ -86,20 +86,20 @@ }, "xunit": { "type": "Direct", - "requested": "[2.5.1, )", - "resolved": "2.5.1", - "contentHash": "WJJ7Ruxv1INF4ySosVZ0fN1dGhzNBEdLLZoIVn4TPU8CbYgaxUebAL/VPaBneXGT3EDE2llsJ2cKzGkGeZSY4Q==", + "requested": "[2.5.2, )", + "resolved": "2.5.2", + "contentHash": "cClLEtMhn9H85jdZILz564FkBHOUP1/KmpColguzWpzXDY8cFRRZ2gW58ahdWBznz8UzRabAUqY+5vZKia+AmQ==", "dependencies": { - "xunit.analyzers": "1.3.0", - "xunit.assert": "2.5.1", - "xunit.core": "[2.5.1]" + "xunit.analyzers": "1.4.0", + "xunit.assert": "2.5.2", + "xunit.core": "[2.5.2]" } }, "xunit.runner.visualstudio": { "type": "Direct", - "requested": "[2.5.1, )", - "resolved": "2.5.1", - "contentHash": "W5dQj2tysIY6MHaidZyqyiR7MGFEk+FrvHRapFyhe11HuR4A6aFGSVi8txi+kkXdY9FDjXffU/1PkNzRX52Caw==" + "requested": "[2.5.3, )", + "resolved": "2.5.3", + "contentHash": "HFFL6O+QLEOfs555SqHii48ovVa4CqGYanY+B32BjLpPptdE+wEJmCFNXlLHdEOD5LYeayb9EroaUpydGpcybg==" }, "Xunit.SkippableFact": { "type": "Direct", @@ -1549,30 +1549,30 @@ }, "xunit.analyzers": { "type": "Transitive", - "resolved": "1.3.0", - "contentHash": "gSk+8RC6UZ6Fzx1OHoB2bPyENeg3WHIeJhB/hb4oZNN0pW0dwOuplJay6OnqFIvW8T37re/RB4PWpEvayWIO1Q==" + "resolved": "1.4.0", + "contentHash": "7ljnTJfFjz5zK+Jf0h2dd2QOSO6UmFizXsojv/x4QX7TU5vEgtKZPk9RvpkiuUqg2bddtNZufBoKQalsi7djfA==" }, "xunit.assert": { "type": "Transitive", - "resolved": "2.5.1", - "contentHash": "eMvuz6PFdD3DDeaXkFVwMzNZ40zcRoM9Zz3siAyWgfiAucSNOWZnVgqC8hSHbdMd98Gy6o0yIYG6mq4Tg37rrQ==", + "resolved": "2.5.2", + "contentHash": "dZNLJWG5HfMAvWBub7eDZwOkP4xuXJj1TSC2AP3bjzIFVGb8rD8xWTvgXlRBXtgPgH+I4Y5hz2MBQrGqUxjDDg==", "dependencies": { "NETStandard.Library": "1.6.1" } }, "xunit.core": { "type": "Transitive", - "resolved": "2.5.1", - "contentHash": "Tzuz//XwPJYAmC9FBIwgBgo5gb2kSoppDwkisyYhq0wtwxhv+gOJwtqUgkgk8Hr19B616Zol03LkD18r2e4AxA==", + "resolved": "2.5.2", + "contentHash": "q1PBUBD1Zxbu5WvRfdpzjUHDzs9vr65gNptEGTQmXISXMXeMG9YPX29Z7oZB0wXSccUCtwQ9uQBd5bkaCMS7hQ==", "dependencies": { - "xunit.extensibility.core": "[2.5.1]", - "xunit.extensibility.execution": "[2.5.1]" + "xunit.extensibility.core": "[2.5.2]", + "xunit.extensibility.execution": "[2.5.2]" } }, "xunit.extensibility.core": { "type": "Transitive", - "resolved": "2.5.1", - "contentHash": "XGPiWP7D/KIY/fzdmU9gx7eDt0QD0IAWOy54LI+ckLZCqFMupIFochC3dHRxykuAz+L0nYvz6PxDdR2UcgNmDw==", + "resolved": "2.5.2", + "contentHash": "peV3Y8Pt3wNoIdHeeGClI4qKUeiEX0LuihAYqbAU0g99sidiPItMsUAURjkAoo3JqX5Lrsg+jiVukXp4Tijmfw==", "dependencies": { "NETStandard.Library": "1.6.1", "xunit.abstractions": "2.0.3" @@ -1580,11 +1580,11 @@ }, "xunit.extensibility.execution": { "type": "Transitive", - "resolved": "2.5.1", - "contentHash": "I5IUervdZoKLD66TUcqsJDXcB3ui9RxzKe0MQGzEi4Hsxkaoz0YylmvwqW2nd3nilyqqIAs0OUaZf/faKPxY6w==", + "resolved": "2.5.2", + "contentHash": "w3Q45Rvva0z1KPtXN5j2DjY9VgBCdWT0mkkr+dZKVyzBtIxnIywzvbEFLJix/dzHdE3XYDXbzh5GfLJHGCDTUg==", "dependencies": { "NETStandard.Library": "1.6.1", - "xunit.extensibility.core": "[2.5.1]" + "xunit.extensibility.core": "[2.5.2]" } }, "stryker": { diff --git a/src/Stryker.RegexMutators/Stryker.RegexMutators.UnitTest/packages.lock.json b/src/Stryker.RegexMutators/Stryker.RegexMutators.UnitTest/packages.lock.json index 92c4b5ab07..d908521ce7 100644 --- a/src/Stryker.RegexMutators/Stryker.RegexMutators.UnitTest/packages.lock.json +++ b/src/Stryker.RegexMutators/Stryker.RegexMutators.UnitTest/packages.lock.json @@ -54,20 +54,20 @@ }, "xunit": { "type": "Direct", - "requested": "[2.5.1, )", - "resolved": "2.5.1", - "contentHash": "WJJ7Ruxv1INF4ySosVZ0fN1dGhzNBEdLLZoIVn4TPU8CbYgaxUebAL/VPaBneXGT3EDE2llsJ2cKzGkGeZSY4Q==", + "requested": "[2.5.2, )", + "resolved": "2.5.2", + "contentHash": "cClLEtMhn9H85jdZILz564FkBHOUP1/KmpColguzWpzXDY8cFRRZ2gW58ahdWBznz8UzRabAUqY+5vZKia+AmQ==", "dependencies": { - "xunit.analyzers": "1.3.0", - "xunit.assert": "2.5.1", - "xunit.core": "[2.5.1]" + "xunit.analyzers": "1.4.0", + "xunit.assert": "2.5.2", + "xunit.core": "[2.5.2]" } }, "xunit.runner.visualstudio": { "type": "Direct", - "requested": "[2.5.1, )", - "resolved": "2.5.1", - "contentHash": "W5dQj2tysIY6MHaidZyqyiR7MGFEk+FrvHRapFyhe11HuR4A6aFGSVi8txi+kkXdY9FDjXffU/1PkNzRX52Caw==" + "requested": "[2.5.3, )", + "resolved": "2.5.3", + "contentHash": "HFFL6O+QLEOfs555SqHii48ovVa4CqGYanY+B32BjLpPptdE+wEJmCFNXlLHdEOD5LYeayb9EroaUpydGpcybg==" }, "DiffEngine": { "type": "Transitive", @@ -1071,30 +1071,30 @@ }, "xunit.analyzers": { "type": "Transitive", - "resolved": "1.3.0", - "contentHash": "gSk+8RC6UZ6Fzx1OHoB2bPyENeg3WHIeJhB/hb4oZNN0pW0dwOuplJay6OnqFIvW8T37re/RB4PWpEvayWIO1Q==" + "resolved": "1.4.0", + "contentHash": "7ljnTJfFjz5zK+Jf0h2dd2QOSO6UmFizXsojv/x4QX7TU5vEgtKZPk9RvpkiuUqg2bddtNZufBoKQalsi7djfA==" }, "xunit.assert": { "type": "Transitive", - "resolved": "2.5.1", - "contentHash": "eMvuz6PFdD3DDeaXkFVwMzNZ40zcRoM9Zz3siAyWgfiAucSNOWZnVgqC8hSHbdMd98Gy6o0yIYG6mq4Tg37rrQ==", + "resolved": "2.5.2", + "contentHash": "dZNLJWG5HfMAvWBub7eDZwOkP4xuXJj1TSC2AP3bjzIFVGb8rD8xWTvgXlRBXtgPgH+I4Y5hz2MBQrGqUxjDDg==", "dependencies": { "NETStandard.Library": "1.6.1" } }, "xunit.core": { "type": "Transitive", - "resolved": "2.5.1", - "contentHash": "Tzuz//XwPJYAmC9FBIwgBgo5gb2kSoppDwkisyYhq0wtwxhv+gOJwtqUgkgk8Hr19B616Zol03LkD18r2e4AxA==", + "resolved": "2.5.2", + "contentHash": "q1PBUBD1Zxbu5WvRfdpzjUHDzs9vr65gNptEGTQmXISXMXeMG9YPX29Z7oZB0wXSccUCtwQ9uQBd5bkaCMS7hQ==", "dependencies": { - "xunit.extensibility.core": "[2.5.1]", - "xunit.extensibility.execution": "[2.5.1]" + "xunit.extensibility.core": "[2.5.2]", + "xunit.extensibility.execution": "[2.5.2]" } }, "xunit.extensibility.core": { "type": "Transitive", - "resolved": "2.5.1", - "contentHash": "XGPiWP7D/KIY/fzdmU9gx7eDt0QD0IAWOy54LI+ckLZCqFMupIFochC3dHRxykuAz+L0nYvz6PxDdR2UcgNmDw==", + "resolved": "2.5.2", + "contentHash": "peV3Y8Pt3wNoIdHeeGClI4qKUeiEX0LuihAYqbAU0g99sidiPItMsUAURjkAoo3JqX5Lrsg+jiVukXp4Tijmfw==", "dependencies": { "NETStandard.Library": "1.6.1", "xunit.abstractions": "2.0.3" @@ -1102,11 +1102,11 @@ }, "xunit.extensibility.execution": { "type": "Transitive", - "resolved": "2.5.1", - "contentHash": "I5IUervdZoKLD66TUcqsJDXcB3ui9RxzKe0MQGzEi4Hsxkaoz0YylmvwqW2nd3nilyqqIAs0OUaZf/faKPxY6w==", + "resolved": "2.5.2", + "contentHash": "w3Q45Rvva0z1KPtXN5j2DjY9VgBCdWT0mkkr+dZKVyzBtIxnIywzvbEFLJix/dzHdE3XYDXbzh5GfLJHGCDTUg==", "dependencies": { "NETStandard.Library": "1.6.1", - "xunit.extensibility.core": "[2.5.1]" + "xunit.extensibility.core": "[2.5.2]" } }, "stryker.regexmutators": { From b4f22e5003ed56d759e027ff7a754422fc23b39f Mon Sep 17 00:00:00 2001 From: Petr Date: Fri, 13 Oct 2023 10:57:27 +0200 Subject: [PATCH 18/22] chore: Breaking down FilePattern (#2681) * Simplifying DiffIgnoreChangesInput * Update FilePattern.cs * Up * up * Rename the class * up --------- Co-authored-by: Rouke Broersma --- .../DiffProviders/GitDiffProviderTests.cs | 8 +-- .../ExclusionPatternTests.cs | 36 ++++++++++++++ .../{Options => }/FilePatternTests.cs | 2 +- .../Options/StrykerOptionsTests.cs | 2 +- .../Stryker.Core/ExclusionPattern.cs | 49 +++++++++++++++++++ src/Stryker.Core/Stryker.Core/FilePattern.cs | 37 +++----------- .../Options/Inputs/DiffIgnoreChangesInput.cs | 10 ++-- .../Stryker.Core/Options/StrykerOptions.cs | 2 +- 8 files changed, 103 insertions(+), 43 deletions(-) create mode 100644 src/Stryker.Core/Stryker.Core.UnitTest/ExclusionPatternTests.cs rename src/Stryker.Core/Stryker.Core.UnitTest/{Options => }/FilePatternTests.cs (98%) create mode 100644 src/Stryker.Core/Stryker.Core/ExclusionPattern.cs diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/DiffProviders/GitDiffProviderTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/DiffProviders/GitDiffProviderTests.cs index a82f3937ee..f18739c610 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/DiffProviders/GitDiffProviderTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/DiffProviders/GitDiffProviderTests.cs @@ -213,7 +213,7 @@ public void ScanDiff_Throws_Stryker_Input_Exception_When_Commit_null() public void ScanDiffReturnsListOfFiles_ExcludingTestFilesInDiffIgnoreFiles() { // Arrange - var diffIgnoreFiles = new[] { new FilePattern(Glob.Parse("/c/Users/JohnDoe/Project/Tests/Test.cs"), false, null) }; + var diffIgnoreFiles = new[] { new ExclusionPattern("/c/Users/JohnDoe/Project/Tests/Test.cs") }; var basePath = FilePathUtils.NormalizePathSeparators("/c/Users/JohnDoe/Project/Tests"); var options = new StrykerOptions() @@ -289,7 +289,7 @@ public void ScanDiffReturnsListOfFiles_ExcludingTestFilesInDiffIgnoreFiles() public void ScanDiffReturnsListOfFiles_ExcludingTestFilesInDiffIgnoreFiles_Single_Asterisk() { // Arrange - var diffIgnoreFiles = new[] { new FilePattern(Glob.Parse("/c/Users/JohnDoe/Project/*/Test.cs"), false, null) }; + var diffIgnoreFiles = new[] { new ExclusionPattern("/c/Users/JohnDoe/Project/*/Test.cs") }; var basePath = FilePathUtils.NormalizePathSeparators("/c/Users/JohnDoe/Project/Tests"); var options = new StrykerOptions() @@ -365,7 +365,7 @@ public void ScanDiffReturnsListOfFiles_ExcludingTestFilesInDiffIgnoreFiles_Singl public void ScanDiffReturnsListOfFiles_ExcludingTestFilesInDiffIgnoreFiles_Multi_Asterisk() { // Arrange - var diffIgnoreFiles = new[] { new FilePattern(Glob.Parse("**/Test.cs"), false, null) }; + var diffIgnoreFiles = new[] { new ExclusionPattern("**/Test.cs") }; var basePath = FilePathUtils.NormalizePathSeparators("/c/Users/JohnDoe/Project/Tests"); var options = new StrykerOptions() @@ -441,7 +441,7 @@ public void ScanDiffReturnsListOfFiles_ExcludingTestFilesInDiffIgnoreFiles_Multi public void ScanDiffReturnsListOfFiles_ExcludingFilesInDiffIgnoreFiles_Multi_Asterisk() { // Arrange - var diffIgnoreFiles = new[] { new FilePattern(Glob.Parse("**/file.cs"), false, null) }; + var diffIgnoreFiles = new[] { new ExclusionPattern("**/file.cs") }; var basePath = FilePathUtils.NormalizePathSeparators("/c/Users/JohnDoe/Project/Tests"); var options = new StrykerOptions() diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/ExclusionPatternTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/ExclusionPatternTests.cs new file mode 100644 index 0000000000..faed616953 --- /dev/null +++ b/src/Stryker.Core/Stryker.Core.UnitTest/ExclusionPatternTests.cs @@ -0,0 +1,36 @@ +using System; +using Shouldly; +using Xunit; + +namespace Stryker.Core.UnitTest +{ + public class ExclusionPatternTests : TestBase + { + [Fact] + public void ExclusionPattern_Null() + { + _ = Assert.Throws(() => new ExclusionPattern(null)); + } + + [Fact] + public void ExclusionPattern_Globs() + { + var s1 = new ExclusionPattern(@"Person.cs"); + var s2 = new ExclusionPattern(@"!Person.cs"); + + s1.IsExcluded.ShouldBeFalse(); + s2.IsExcluded.ShouldBeTrue(); + s1.Glob.ToString().ShouldBe(s2.Glob.ToString()); + } + + [Fact] + public void ExclusionPattern_MutantSpans() + { + var s1 = new ExclusionPattern(@"src/Person.cs{10..100}"); + var s2 = new ExclusionPattern(@"src/Person.cs"); + + s1.MutantSpans.ShouldBe(new [] { (10, 100)}); + s2.MutantSpans.ShouldBeEmpty(); + } + } +} diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/FilePatternTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/FilePatternTests.cs similarity index 98% rename from src/Stryker.Core/Stryker.Core.UnitTest/Options/FilePatternTests.cs rename to src/Stryker.Core/Stryker.Core.UnitTest/FilePatternTests.cs index 432f764ef8..d8f8db2aeb 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/FilePatternTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/FilePatternTests.cs @@ -5,7 +5,7 @@ using Shouldly; using Xunit; -namespace Stryker.Core.UnitTest.Options +namespace Stryker.Core.UnitTest { public class FilePatternTests : TestBase { diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/StrykerOptionsTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/StrykerOptionsTests.cs index 0e539a1fb5..6e7d1eab64 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/StrykerOptionsTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/StrykerOptionsTests.cs @@ -26,7 +26,7 @@ public void ShouldCopyValues() DashboardUrl = "url", DevMode = true, Since = true, - DiffIgnoreChanges = new[] { new FilePattern(Glob.Parse("**"), true, null) }, + DiffIgnoreChanges = new[] { new ExclusionPattern("**") }, ExcludedMutations = new[] { Mutator.Bitwise }, FallbackVersion = "main", IgnoredMethods = new[] { new Regex("") }, diff --git a/src/Stryker.Core/Stryker.Core/ExclusionPattern.cs b/src/Stryker.Core/Stryker.Core/ExclusionPattern.cs new file mode 100644 index 0000000000..1dd75a2dfc --- /dev/null +++ b/src/Stryker.Core/Stryker.Core/ExclusionPattern.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text.RegularExpressions; +using DotNet.Globbing; + +namespace Stryker.Core +{ + public readonly struct ExclusionPattern + { + private static readonly Regex _mutantSpanGroupRegex = new("(\\{(\\d+)\\.\\.(\\d+)\\})+$"); + private static readonly Regex _mutantSpanRegex = new Regex("\\{(\\d+)\\.\\.(\\d+)\\}"); + + public ExclusionPattern(string s) + { + if (s is null) + { + throw new ArgumentNullException(nameof(s)); + } + + IsExcluded = s.StartsWith('!'); + + var pattern = IsExcluded ? s[1..] : s; + var mutantSpansRegex = _mutantSpanGroupRegex.Match(pattern); + if (mutantSpansRegex.Success) + { + var filePathPart = pattern[..^mutantSpansRegex.Length]; + var normalized = FilePathUtils.NormalizePathSeparators(filePathPart); + Glob = Glob.Parse(normalized); + + MutantSpans = _mutantSpanRegex + .Matches(mutantSpansRegex.Value) + .Select(x => (int.Parse(x.Groups[1].Value), int.Parse(x.Groups[2].Value))); + } + else + { + var normalized = FilePathUtils.NormalizePathSeparators(pattern); + Glob = Glob.Parse(normalized); + MutantSpans = Enumerable.Empty<(int, int)>(); + } + } + + public bool IsExcluded { get; } + + public Glob Glob { get; } + + public IEnumerable<(int Start, int End)> MutantSpans { get; } + } +} diff --git a/src/Stryker.Core/Stryker.Core/FilePattern.cs b/src/Stryker.Core/Stryker.Core/FilePattern.cs index 040bae02c4..44f7fb1dd2 100644 --- a/src/Stryker.Core/Stryker.Core/FilePattern.cs +++ b/src/Stryker.Core/Stryker.Core/FilePattern.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text.RegularExpressions; namespace Stryker.Core { @@ -13,8 +12,6 @@ namespace Stryker.Core /// public sealed class FilePattern : IEquatable { - private static readonly Regex _textSpanGroupRegex = new Regex("(\\{(\\d+)\\.\\.(\\d+)\\})+$"); - private static readonly Regex _textSpanRegex = new Regex("\\{(\\d+)\\.\\.(\\d+)\\}"); private static readonly TextSpan _textSpanMaxValue = new TextSpan(0, int.MaxValue); public FilePattern(Glob glob, bool isExclude, IReadOnlyCollection textSpans) @@ -45,47 +42,25 @@ public FilePattern(Glob glob, bool isExclude, IReadOnlyCollection text /// /// The pattern to parse. /// The - public static FilePattern Parse(string pattern) => Parse(pattern, spansEnabled: true); - - /// - /// Parses a given file pattern string. - /// Format: (!)<glob>({<spanStart>..<spanEnd>})* - /// - /// The pattern to parse. - /// Enable or disable span parsing. - /// The - public static FilePattern Parse(string pattern, bool spansEnabled) + public static FilePattern Parse(string pattern) { - var exclude = false; + var s = new ExclusionPattern(pattern); IReadOnlyCollection textSpans; - if (pattern.StartsWith('!')) - { - exclude = true; - pattern = pattern[1..]; - } - - var textSpanGroupMatch = _textSpanGroupRegex.Match(pattern); - if (!spansEnabled || !textSpanGroupMatch.Success) + if (!s.MutantSpans.Any()) { // If there are no spans specified, we add one that will cover the whole file. textSpans = new[] { _textSpanMaxValue }; } else { - // If we have one ore more spans we parse them. - var textSpansMatches = _textSpanRegex.Matches(textSpanGroupMatch.Value); - textSpans = textSpansMatches - .Select(x => TextSpan.FromBounds(int.Parse(x.Groups[1].Value), int.Parse(x.Groups[2].Value))) + textSpans = s.MutantSpans + .Select(x => TextSpan.FromBounds(x.Start, x.End)) .Reduce() .ToList(); - - pattern = pattern.Substring(0, pattern.Length - textSpanGroupMatch.Length); } - var glob = Glob.Parse(FilePathUtils.NormalizePathSeparators(pattern)); - - return new FilePattern(glob, exclude, textSpans); + return new FilePattern(s.Glob, s.IsExcluded, textSpans); } /// diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/DiffIgnoreChangesInput.cs b/src/Stryker.Core/Stryker.Core/Options/Inputs/DiffIgnoreChangesInput.cs index 614e786a31..805ac68822 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/DiffIgnoreChangesInput.cs +++ b/src/Stryker.Core/Stryker.Core/Options/Inputs/DiffIgnoreChangesInput.cs @@ -14,19 +14,19 @@ Any non-excluded files will trigger all mutants to be tested because we cannot d Use glob syntax for wildcards: https://en.wikipedia.org/wiki/Glob_(programming) Example: ['**/*Assets.json','**/favicon.ico']"; - public IEnumerable Validate() + public IEnumerable Validate() { if (SuppliedInput is { }) { - var diffIgnoreFilePatterns = new List(); + var diffIgnoreStrings = new List(); foreach (var pattern in SuppliedInput) { - diffIgnoreFilePatterns.Add(FilePattern.Parse(FilePathUtils.NormalizePathSeparators(pattern), spansEnabled: false)); + diffIgnoreStrings.Add(new ExclusionPattern(FilePathUtils.NormalizePathSeparators(pattern))); } - return diffIgnoreFilePatterns; + return diffIgnoreStrings; } - return Enumerable.Empty(); + return Enumerable.Empty(); } } } diff --git a/src/Stryker.Core/Stryker.Core/Options/StrykerOptions.cs b/src/Stryker.Core/Stryker.Core/Options/StrykerOptions.cs index 8d62d19a49..78e4b43512 100644 --- a/src/Stryker.Core/Stryker.Core/Options/StrykerOptions.cs +++ b/src/Stryker.Core/Stryker.Core/Options/StrykerOptions.cs @@ -153,7 +153,7 @@ public class StrykerOptions /// Context: When using the since feature, all tests are run again if files in the test project change (as these could impact the test results) /// When the file is present in this option the tests should not run again as the file does not impact test results. /// - public IEnumerable DiffIgnoreChanges { get; init; } = Enumerable.Empty(); + public IEnumerable DiffIgnoreChanges { get; init; } = Enumerable.Empty(); /// /// When no previous report can be found for the since feature, this commitish is used to se a baseline. From bb1f129a3c25113ca57b3a95cff4a5b954e0df4f Mon Sep 17 00:00:00 2001 From: Petr Date: Fri, 13 Oct 2023 11:24:20 +0200 Subject: [PATCH 19/22] chore: Splitting some C# related extensions in a separate file (#2697) Splitting some C# related extensions in a separate file Co-authored-by: Rouke Broersma --- .../IAnalyzerResultCSharpExtensions.cs | 41 ++++++++++++++++++ .../Buildalyzer/IAnalyzerResultExtensions.cs | 43 +++---------------- 2 files changed, 46 insertions(+), 38 deletions(-) create mode 100644 src/Stryker.Core/Stryker.Core/Initialisation/Buildalyzer/IAnalyzerResultCSharpExtensions.cs diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/Buildalyzer/IAnalyzerResultCSharpExtensions.cs b/src/Stryker.Core/Stryker.Core/Initialisation/Buildalyzer/IAnalyzerResultCSharpExtensions.cs new file mode 100644 index 0000000000..6343345b24 --- /dev/null +++ b/src/Stryker.Core/Stryker.Core/Initialisation/Buildalyzer/IAnalyzerResultCSharpExtensions.cs @@ -0,0 +1,41 @@ +using System; +using Buildalyzer; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using Stryker.Core.Options; + +namespace Stryker.Core.Initialisation.Buildalyzer +{ + public static class IAnalyzerResultCSharpExtensions + { + public static CSharpCompilationOptions GetCompilationOptions(this IAnalyzerResult analyzerResult) + { + var compilationOptions = new CSharpCompilationOptions(analyzerResult.GetOutputKind()) + .WithNullableContextOptions(analyzerResult.GetNullableContextOptions()) + .WithAllowUnsafe(analyzerResult.GetPropertyOrDefault("AllowUnsafeBlocks", true)) + .WithAssemblyIdentityComparer(DesktopAssemblyIdentityComparer.Default) + .WithConcurrentBuild(true) + .WithModuleName(analyzerResult.GetAssemblyName()) + .WithOverflowChecks(analyzerResult.GetPropertyOrDefault("CheckForOverflowUnderflow", false)); + + if (analyzerResult.IsSignedAssembly() && analyzerResult.GetAssemblyOriginatorKeyFile() is var keyFile && keyFile is not null) + { + compilationOptions = compilationOptions.WithCryptoKeyFile(keyFile) + .WithStrongNameProvider(new DesktopStrongNameProvider()); + } + return compilationOptions; + } + + public static CSharpParseOptions GetParseOptions(this IAnalyzerResult analyzerResult, StrykerOptions options) => new CSharpParseOptions(options.LanguageVersion, DocumentationMode.None, preprocessorSymbols: analyzerResult.PreprocessorSymbols); + + private static NullableContextOptions GetNullableContextOptions(this IAnalyzerResult analyzerResult) + { + if (!Enum.TryParse(analyzerResult.GetPropertyOrDefault("Nullable", "enable"), true, out NullableContextOptions nullableOptions)) + { + nullableOptions = NullableContextOptions.Enable; + } + + return nullableOptions; + } + } +} diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/Buildalyzer/IAnalyzerResultExtensions.cs b/src/Stryker.Core/Stryker.Core/Initialisation/Buildalyzer/IAnalyzerResultExtensions.cs index 7bd650b39d..4ffdba6ba9 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/Buildalyzer/IAnalyzerResultExtensions.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/Buildalyzer/IAnalyzerResultExtensions.cs @@ -1,17 +1,14 @@ using System; using System.Collections.Generic; -using System.Collections.Immutable; using System.IO; using System.Linq; using System.Reflection; using Buildalyzer; using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Diagnostics; using Microsoft.Extensions.Logging; using NuGet.Frameworks; using Stryker.Core.Exceptions; -using Stryker.Core.Options; namespace Stryker.Core.Initialisation.Buildalyzer { @@ -34,26 +31,6 @@ public static IEnumerable GetResources(this IAnalyzerResult embeddedResources); } - public static CSharpCompilationOptions GetCompilationOptions(this IAnalyzerResult analyzerResult) - { - var compilationOptions = new CSharpCompilationOptions(analyzerResult.GetOutputKind()) - .WithNullableContextOptions(analyzerResult.GetNullableContextOptions()) - .WithAllowUnsafe(analyzerResult.GetPropertyOrDefault("AllowUnsafeBlocks", true)) - .WithAssemblyIdentityComparer(DesktopAssemblyIdentityComparer.Default) - .WithConcurrentBuild(true) - .WithModuleName(analyzerResult.GetAssemblyName()) - .WithOverflowChecks(analyzerResult.GetPropertyOrDefault("CheckForOverflowUnderflow", false)); - - if (analyzerResult.IsSignedAssembly() && analyzerResult.GetAssemblyOriginatorKeyFile() is var keyFile && keyFile is not null) - { - compilationOptions = compilationOptions.WithCryptoKeyFile(keyFile) - .WithStrongNameProvider(new DesktopStrongNameProvider()); - } - return compilationOptions; - } - - public static CSharpParseOptions GetParseOptions(this IAnalyzerResult analyzerResult, StrykerOptions options) => new CSharpParseOptions(options.LanguageVersion, DocumentationMode.None, preprocessorSymbols: analyzerResult.PreprocessorSymbols); - public static string AssemblyAttributeFileName(this IAnalyzerResult analyzerResult) => analyzerResult.GetPropertyOrDefault("GeneratedAssemblyInfoFile", (Path.GetFileNameWithoutExtension(analyzerResult.ProjectFilePath) + ".AssemblyInfo.cs") .ToLowerInvariant()); @@ -153,7 +130,7 @@ public static bool IsTestProject(this IAnalyzerResult analyzerResult) return isTestProject || hasTestProjectTypeGuid; } - private static OutputKind GetOutputKind(this IAnalyzerResult analyzerResult) => analyzerResult.GetPropertyOrDefault("OutputType") switch + internal static OutputKind GetOutputKind(this IAnalyzerResult analyzerResult) => analyzerResult.GetPropertyOrDefault("OutputType") switch { "Exe" => OutputKind.ConsoleApplication, "WinExe" => OutputKind.WindowsApplication, @@ -163,19 +140,9 @@ public static bool IsTestProject(this IAnalyzerResult analyzerResult) _ => OutputKind.DynamicallyLinkedLibrary }; - private static NullableContextOptions GetNullableContextOptions(this IAnalyzerResult analyzerResult) - { - if (!Enum.TryParse(analyzerResult.GetPropertyOrDefault("Nullable", "enable"), true, out NullableContextOptions nullableOptions)) - { - nullableOptions = NullableContextOptions.Enable; - } - - return nullableOptions; - } - - private static bool IsSignedAssembly(this IAnalyzerResult analyzerResult) => analyzerResult.GetPropertyOrDefault("SignAssembly", false); + internal static bool IsSignedAssembly(this IAnalyzerResult analyzerResult) => analyzerResult.GetPropertyOrDefault("SignAssembly", false); - private static string GetAssemblyOriginatorKeyFile(this IAnalyzerResult analyzerResult) + internal static string GetAssemblyOriginatorKeyFile(this IAnalyzerResult analyzerResult) { var assemblyKeyFileProp = analyzerResult.GetPropertyOrDefault("AssemblyOriginatorKeyFile"); if (assemblyKeyFileProp is null) @@ -188,9 +155,9 @@ private static string GetAssemblyOriginatorKeyFile(this IAnalyzerResult analyzer private static string GetRootNamespace(this IAnalyzerResult analyzerResult) => analyzerResult.GetPropertyOrDefault("RootNamespace") ?? analyzerResult.GetAssemblyName(); - private static bool GetPropertyOrDefault(this IAnalyzerResult analyzerResult, string name, bool defaultBoolean) => bool.Parse(GetPropertyOrDefault(analyzerResult, name, defaultBoolean.ToString())); + internal static bool GetPropertyOrDefault(this IAnalyzerResult analyzerResult, string name, bool defaultBoolean) => bool.Parse(GetPropertyOrDefault(analyzerResult, name, defaultBoolean.ToString())); - private static string GetPropertyOrDefault(this IAnalyzerResult analyzerResult, string name, string defaultValue = default) + internal static string GetPropertyOrDefault(this IAnalyzerResult analyzerResult, string name, string defaultValue = default) { if (analyzerResult.Properties is null || !analyzerResult.Properties.TryGetValue(name, out var property)) { From 5408cfab64866cc2a85152b5d84e96a7d1d72421 Mon Sep 17 00:00:00 2001 From: Dani Hengeveld Date: Fri, 13 Oct 2023 14:26:16 +0200 Subject: [PATCH 20/22] fix: tests for `OpenReportEnabledInput` help text --- .../Options/Inputs/OpenReportEnabledInputTests.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OpenReportEnabledInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OpenReportEnabledInputTests.cs index c46a49a8bd..11d07dfd72 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OpenReportEnabledInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OpenReportEnabledInputTests.cs @@ -1,5 +1,4 @@ using Shouldly; -using Stryker.Core.Exceptions; using Stryker.Core.Options.Inputs; using Xunit; @@ -8,10 +7,10 @@ namespace Stryker.Core.UnitTest.Options.Inputs public class OpenReportEnabledInputTests : TestBase { [Fact] - public void ShouldHaveNoHelpText() + public void ShouldHaveHelpText() { var target = new OpenReportEnabledInput(); - target.HelpText.ShouldBe(@" | default: 'False'"); + target.HelpText.ShouldBe(@"When enabled the report will open automatically after stryker has generated the report. | default: 'False'"); } [Fact] From 79492e5d4a64dabed7fb2a40af68b8e0492c2487 Mon Sep 17 00:00:00 2001 From: Dani Hengeveld Date: Fri, 13 Oct 2023 14:52:05 +0200 Subject: [PATCH 21/22] fix: typo in re(c)reate --- .../Inputs/BaselineCreateEnabledInputTests.cs | 41 ------------------- .../BaselineRecreateEnabledInputTests.cs | 37 +++++++++++++++++ .../Inputs/BaselineCreateEnabledInput.cs | 2 +- .../Stryker.Core/Options/StrykerInputs.cs | 4 +- 4 files changed, 40 insertions(+), 44 deletions(-) delete mode 100644 src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BaselineCreateEnabledInputTests.cs create mode 100644 src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BaselineRecreateEnabledInputTests.cs diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BaselineCreateEnabledInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BaselineCreateEnabledInputTests.cs deleted file mode 100644 index 99bfff5313..0000000000 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BaselineCreateEnabledInputTests.cs +++ /dev/null @@ -1,41 +0,0 @@ -using Shouldly; -using Stryker.Core.Baseline.Providers; -using Stryker.Core.Exceptions; -using Stryker.Core.Options.Inputs; -using Stryker.Core.Reporters; -using Xunit; - -namespace Stryker.Core.UnitTest.Options.Inputs -{ - public class BaselineCreateEnabledInputTests : TestBase - { - [Fact] - public void ShouldHaveHelpText() - { - var target = new BaselineRereateEnabledInput(); - target.HelpText.ShouldBe("When enabled a new baseline will be created by doing a full run and storing the mutation results. | default: 'False'"); - } - - [Fact] - public void ShouldHaveDefault() - { - var target = new BaselineRereateEnabledInput { SuppliedInput = true }; - - var result = target.Validate(); - - target.Default.ShouldBeFalse(); - result.ShouldBeTrue(); - } - - [Fact] - public void ShouldHaveDefaultForDashboard() - { - var target = new BaselineRereateEnabledInput { SuppliedInput = false }; - - var result = target.Validate(); - - target.Default.ShouldBeFalse(); - result.ShouldBeFalse(); - } - } -} diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BaselineRecreateEnabledInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BaselineRecreateEnabledInputTests.cs new file mode 100644 index 0000000000..8af7a7460b --- /dev/null +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BaselineRecreateEnabledInputTests.cs @@ -0,0 +1,37 @@ +using Shouldly; +using Stryker.Core.Options.Inputs; +using Xunit; + +namespace Stryker.Core.UnitTest.Options.Inputs; + +public class BaselineRecreateEnabledInputTests : TestBase +{ + [Fact] + public void ShouldHaveHelpText() + { + var target = new BaselineRecreateEnabledInput(); + target.HelpText.ShouldBe("When enabled a new baseline will be created by doing a full run and storing the mutation results. | default: 'False'"); + } + + [Fact] + public void ShouldHaveDefault() + { + var target = new BaselineRecreateEnabledInput { SuppliedInput = true }; + + var result = target.Validate(); + + target.Default.ShouldBeFalse(); + result.ShouldBeTrue(); + } + + [Fact] + public void ShouldHaveDefaultForDashboard() + { + var target = new BaselineRecreateEnabledInput { SuppliedInput = false }; + + var result = target.Validate(); + + target.Default.ShouldBeFalse(); + result.ShouldBeFalse(); + } +} diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/BaselineCreateEnabledInput.cs b/src/Stryker.Core/Stryker.Core/Options/Inputs/BaselineCreateEnabledInput.cs index aebb47c497..2859535143 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/BaselineCreateEnabledInput.cs +++ b/src/Stryker.Core/Stryker.Core/Options/Inputs/BaselineCreateEnabledInput.cs @@ -1,6 +1,6 @@ namespace Stryker.Core.Options.Inputs { - public class BaselineRereateEnabledInput : Input + public class BaselineRecreateEnabledInput : Input { public override bool Default => false; diff --git a/src/Stryker.Core/Stryker.Core/Options/StrykerInputs.cs b/src/Stryker.Core/Stryker.Core/Options/StrykerInputs.cs index f592793bbd..0898d5d61a 100644 --- a/src/Stryker.Core/Stryker.Core/Options/StrykerInputs.cs +++ b/src/Stryker.Core/Stryker.Core/Options/StrykerInputs.cs @@ -9,7 +9,7 @@ public interface IStrykerInputs AdditionalTimeoutInput AdditionalTimeoutInput { get; init; } AzureFileStorageSasInput AzureFileStorageSasInput { get; init; } AzureFileStorageUrlInput AzureFileStorageUrlInput { get; init; } - BaselineRereateEnabledInput BaselineRecreateEnabledInput { get; init; } + BaselineRecreateEnabledInput BaselineRecreateEnabledInput { get; init; } BaselineProviderInput BaselineProviderInput { get; init; } BasePathInput BasePathInput { get; init; } ConcurrencyInput ConcurrencyInput { get; init; } @@ -82,7 +82,7 @@ public StrykerInputs(IFileSystem fileSystem = null) public TestProjectsInput TestProjectsInput { get; init; } = new(); public TestCaseFilterInput TestCaseFilterInput { get; init; } = new(); public ReportersInput ReportersInput { get; init; } = new(); - public BaselineRereateEnabledInput BaselineRecreateEnabledInput { get; init; } = new(); + public BaselineRecreateEnabledInput BaselineRecreateEnabledInput { get; init; } = new(); public WithBaselineInput WithBaselineInput { get; init; } = new(); public BaselineProviderInput BaselineProviderInput { get; init; } = new(); public AzureFileStorageUrlInput AzureFileStorageUrlInput { get; init; } = new(); From 0e6f2437eabc522e32c084060df45572528a5078 Mon Sep 17 00:00:00 2001 From: Dani Hengeveld Date: Fri, 13 Oct 2023 14:53:47 +0200 Subject: [PATCH 22/22] add: tests for baseline target input. change: target input default to 'master' to stay consistent with since target input. --- .../Inputs/BaselineTargetInputTests.cs | 52 +++++++++++++++++++ .../Options/Inputs/SinceTargetInputTests.cs | 11 ++-- .../Options/Inputs/BaselineTargetInput.cs | 2 +- 3 files changed, 60 insertions(+), 5 deletions(-) create mode 100644 src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BaselineTargetInputTests.cs diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BaselineTargetInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BaselineTargetInputTests.cs new file mode 100644 index 0000000000..0973a46ca9 --- /dev/null +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BaselineTargetInputTests.cs @@ -0,0 +1,52 @@ +using Shouldly; +using Stryker.Core.Exceptions; +using Stryker.Core.Options.Inputs; +using Xunit; + +namespace Stryker.Core.UnitTest.Options.Inputs; + +public class BaselineTargetInputTests : TestBase +{ + [Fact] + public void ShouldHaveHelpText() + { + var target = new BaselineTargetInput(); + target.HelpText.ShouldBe( + "The target branch/commit to compare with the current codebase when the baseline feature is enabled. | default: 'master'"); + } + + [Fact] + public void ShouldUseSuppliedInputWhenSinceEnabled() + { + var suppliedInput = "develop"; + var validatedBaselineBranch = + new BaselineTargetInput { SuppliedInput = suppliedInput }.Validate(sinceEnabled: true); + validatedBaselineBranch.ShouldBe(suppliedInput); + } + + [Fact] + public void ShouldUseDefaultWhenSinceEnabledAndInputNull() + { + var input = new BaselineTargetInput(); + var validatedBaselineBranch = input.Validate(sinceEnabled: true); + validatedBaselineBranch.ShouldBe(input.Default); + } + + [Fact] + public void MustNotBeEmptyStringWhenSinceEnabled() + { + var ex = Assert.Throws(() => + { + new BaselineTargetInput { SuppliedInput = "" }.Validate(sinceEnabled: true); + }); + ex.Message.ShouldBe("The baseline target cannot be empty when the since feature is enabled"); + } + + [Fact] + public void ShouldNotValidateBaselineTargetWhenSinceDisabled() + { + var input = new BaselineTargetInput { SuppliedInput = "develop" }; + var validatedBaselineBranch = input.Validate(sinceEnabled: false); + validatedBaselineBranch.ShouldBe(input.Default); + } +} diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SinceTargetInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SinceTargetInputTests.cs index 9253d1ba22..0ee6dd025f 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SinceTargetInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SinceTargetInputTests.cs @@ -11,14 +11,16 @@ public class SinceTargetInputTests : TestBase public void ShouldHaveHelpText() { var target = new SinceTargetInput(); - target.HelpText.ShouldBe(@"The target branch/commit to compare with the current codebase when the since feature is enabled. | default: 'master'"); + target.HelpText.ShouldBe( + @"The target branch/commit to compare with the current codebase when the since feature is enabled. | default: 'master'"); } [Fact] public void ShouldUseSuppliedInputWhenSinceEnabled() { var suppliedInput = "develop"; - var validatedSinceBranch = new SinceTargetInput { SuppliedInput = suppliedInput }.Validate(sinceEnabled: true); + var validatedSinceBranch = + new SinceTargetInput { SuppliedInput = suppliedInput }.Validate(sinceEnabled: true); validatedSinceBranch.ShouldBe(suppliedInput); } @@ -43,8 +45,9 @@ public void MustNotBeEmptyStringWhenSinceEnabled() [Fact] public void ShouldNotValidateSinceTargetWhenSinceDisabled() { - var validatedSinceBranch = new SinceTargetInput { SuppliedInput = "develop" }.Validate(sinceEnabled: false); - validatedSinceBranch.ShouldBe("master"); + var input = new SinceTargetInput { SuppliedInput = "develop" }; + var validatedSinceBranch = input.Validate(sinceEnabled: false); + validatedSinceBranch.ShouldBe(input.Default); } } } diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/BaselineTargetInput.cs b/src/Stryker.Core/Stryker.Core/Options/Inputs/BaselineTargetInput.cs index 9f67c280bb..c56af8de77 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/BaselineTargetInput.cs +++ b/src/Stryker.Core/Stryker.Core/Options/Inputs/BaselineTargetInput.cs @@ -4,7 +4,7 @@ namespace Stryker.Core.Options.Inputs { public class BaselineTargetInput : Input { - public override string Default => "main"; + public override string Default => "master"; protected override string Description => "The target branch/commit to compare with the current codebase when the baseline feature is enabled."; public string Validate(bool sinceEnabled)