From ca9b3546c3d2918933a29ba14c1d99dcf11e7a6b Mon Sep 17 00:00:00 2001 From: Dani Hengeveld Date: Fri, 13 Oct 2023 15:12:37 +0200 Subject: [PATCH] Merge master, fix and add tests, consistency (#2712) * 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 * chore: fix page links for site * fix: Don't fail the test run if restoring test assemblies fails (#2664) * 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 * 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 * chore: F# range math (#2679) * F# range math * Windows x Linux * Up * chore: Passing Stryker options to F# project components (#2680) Co-authored-by: Rouke Broersma * fix: Use solution file when it's available (#2690) * Use solution file when it's available * fix unit test * sonarqube * chore(compilation): Improve Error and Trace Logging (#2688) Add logs Co-authored-by: Rouke Broersma * fix: Remove usings from MutantControl (#2694) chore: remove usings from MutantControl Co-authored-by: Rouke Broersma * 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 * docs: add SAS configuration (#2676) (#2701) docs: add SAS configuration * 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 * 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 * 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 * 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 * chore(deps): update xunit-dotnet monorepo (#2711) * chore(deps): update xunit-dotnet monorepo * Update package lock files --------- Co-authored-by: Renovatebot * chore: Breaking down FilePattern (#2681) * Simplifying DiffIgnoreChangesInput * Update FilePattern.cs * Up * up * Rename the class * up --------- Co-authored-by: Rouke Broersma * 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 * fix: tests for `OpenReportEnabledInput` help text * fix: typo in re(c)reate * add: tests for baseline target input. change: target input default to 'master' to stay consistent with since target input. --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Renovatebot Co-authored-by: Rouke Broersma Co-authored-by: Pent Ploompuu Co-authored-by: Petr Co-authored-by: Rouke Broersma Co-authored-by: Jack Steel Co-authored-by: Cyrille DUPUYDAUBY Co-authored-by: Max S --- .../boolMutateTestApp.Test.fsproj | 4 +- .../Xamarin.Forms.Tests.csproj | 4 +- adding_a_mutator.md | 4 +- docs/configuration.md | 10 +- .../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 | 10 +- .../Stryker.CLI.UnitTest/packages.lock.json | 128 ++--- .../Stryker.CLI/packages.lock.json | 76 +-- .../DiffProviders/GitDiffProviderTests.cs | 8 +- .../ExclusionPatternTests.cs | 36 ++ .../{Options => }/FilePatternTests.cs | 2 +- .../Helpers/RangeHelperTests.cs | 534 ++++++++++++++++++ .../TextSpanHelperTests.cs} | 10 +- .../TargetFrameworkResolutionTests.cs | 2 +- .../Inputs/BaselineCreateEnabledInputTests.cs | 41 -- .../BaselineRecreateEnabledInputTests.cs | 37 ++ .../Inputs/BaselineTargetInputTests.cs | 52 ++ .../Inputs/OpenReportEnabledInputTests.cs | 5 +- .../Options/Inputs/SinceTargetInputTests.cs | 11 +- .../Options/StrykerOptionsTests.cs | 2 +- .../Stryker.Core.UnitTest/packages.lock.json | 128 ++--- .../Compiling/CsharpCompilingProcess.cs | 25 +- .../Stryker.Core/ExclusionPattern.cs | 49 ++ src/Stryker.Core/Stryker.Core/FilePattern.cs | 39 +- .../Stryker.Core/Helpers/RangeHelper.cs | 198 +++++++ .../Stryker.Core/Helpers/TextSpanHelper.cs | 101 ++++ .../IAnalyzerResultCSharpExtensions.cs | 41 ++ .../Buildalyzer/IAnalyzerResultExtensions.cs | 43 +- .../FsharpProjectComponentsBuilder.cs | 5 +- .../Initialisation/InputFileResolver.cs | 15 +- .../Initialisation/ProjectFileReader.cs | 24 +- .../InjectedHelpers/MutantControl.cs | 26 +- .../Inputs/BaselineCreateEnabledInput.cs | 2 +- .../Options/Inputs/BaselineTargetInput.cs | 2 +- .../Options/Inputs/DiffIgnoreChangesInput.cs | 10 +- .../Stryker.Core/Options/StrykerInputs.cs | 4 +- .../Stryker.Core/Options/StrykerOptions.cs | 2 +- .../ProjectComponentsExtensions.cs | 94 +-- .../TestProjects/TestProjectsInfo.cs | 9 +- .../Stryker.Core/packages.lock.json | 12 +- .../packages.lock.json | 44 +- 49 files changed, 1471 insertions(+), 577 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.UnitTest/Helpers/RangeHelperTests.cs rename src/Stryker.Core/Stryker.Core.UnitTest/{ProjectComponents/ProjectComponentExtensionsTests.cs => Helpers/TextSpanHelperTests.cs} (94%) 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 create mode 100644 src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BaselineTargetInputTests.cs create mode 100644 src/Stryker.Core/Stryker.Core/ExclusionPattern.cs create mode 100644 src/Stryker.Core/Stryker.Core/Helpers/RangeHelper.cs create mode 100644 src/Stryker.Core/Stryker.Core/Helpers/TextSpanHelper.cs create mode 100644 src/Stryker.Core/Stryker.Core/Initialisation/Buildalyzer/IAnalyzerResultCSharpExtensions.cs diff --git a/ExampleProjects/FsharpMutateTestApp/boolMutateTestApp.Test/boolMutateTestApp.Test.fsproj b/ExampleProjects/FsharpMutateTestApp/boolMutateTestApp.Test/boolMutateTestApp.Test.fsproj index b0f9c6a74f..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 2dee394d80..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/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" diff --git a/docs/configuration.md b/docs/configuration.md index dee50213d2..9dac80bf9e 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -573,7 +573,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). ### `baseline recreate` <`flag`> diff --git a/integrationtest/TargetProjects/EmptyTestProject/EmptyTestProject.csproj b/integrationtest/TargetProjects/EmptyTestProject/EmptyTestProject.csproj index 788065c443..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 b6daf051d1..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.0, )", - "resolved": "2.5.0", - "contentHash": "f2V5wuAdoaq0mRTt9UBmPbVex9HcwFYn+y7WaKUz5Xpakcrv7lhtQWBJUWNY4N3Z+o+atDBLyAALM1QWx04C6Q==", + "requested": "[2.5.2, )", + "resolved": "2.5.2", + "contentHash": "cClLEtMhn9H85jdZILz564FkBHOUP1/KmpColguzWpzXDY8cFRRZ2gW58ahdWBznz8UzRabAUqY+5vZKia+AmQ==", "dependencies": { - "xunit.analyzers": "1.2.0", - "xunit.assert": "2.5.0", - "xunit.core": "[2.5.0]" + "xunit.analyzers": "1.4.0", + "xunit.assert": "2.5.2", + "xunit.core": "[2.5.2]" } }, "xunit.runner.visualstudio": { "type": "Direct", - "requested": "[2.5.0, )", - "resolved": "2.5.0", - "contentHash": "+Gp9vuC2431yPyKB15YrOTxCuEAErBQUTIs6CquumX1F073UaPHGW0VE/XVJLMh9W4sXdz3TBkcHdFWZrRn2Hw==" + "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.2.0", - "contentHash": "d3dehV/DASLRlR8stWQmbPPjfYC2tct50Evav+OlsJMkfFqkhYvzO1k0s81lk0px8O0knZU/FqC8SqbXOtn+hw==" + "resolved": "1.4.0", + "contentHash": "7ljnTJfFjz5zK+Jf0h2dd2QOSO6UmFizXsojv/x4QX7TU5vEgtKZPk9RvpkiuUqg2bddtNZufBoKQalsi7djfA==" }, "xunit.assert": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "wN84pKX5jzfpgJ0bB6arrCA/oelBeYLCpnQ9Wj5xGEVPydKzVSDY5tEatFLHE/rO0+0RC+I4H5igGE118jRh1w==", + "resolved": "2.5.2", + "contentHash": "dZNLJWG5HfMAvWBub7eDZwOkP4xuXJj1TSC2AP3bjzIFVGb8rD8xWTvgXlRBXtgPgH+I4Y5hz2MBQrGqUxjDDg==", "dependencies": { "NETStandard.Library": "1.6.1" } }, "xunit.core": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "dnV0Mn2s1C0y2m33AylQyMkEyhBQsL4R0302kwSGiEGuY3JwzEmhTa9pnghyMRPliYSs4fXfkEAP+5bKXryGFg==", + "resolved": "2.5.2", + "contentHash": "q1PBUBD1Zxbu5WvRfdpzjUHDzs9vr65gNptEGTQmXISXMXeMG9YPX29Z7oZB0wXSccUCtwQ9uQBd5bkaCMS7hQ==", "dependencies": { - "xunit.extensibility.core": "[2.5.0]", - "xunit.extensibility.execution": "[2.5.0]" + "xunit.extensibility.core": "[2.5.2]", + "xunit.extensibility.execution": "[2.5.2]" } }, "xunit.extensibility.core": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "xRm6NIV3i7I+LkjsAJ91Xz2fxJm/oMEi2CYq1G5HlGTgcK1Zo2wNbLO6nKX1VG5FZzXibSdoLwr/MofVvh3mFA==", + "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.0", - "contentHash": "7+v2Bvp+1ew1iMGQVb1glICi8jcNdHbRUX6Ru0dmJBViGdjiS7kyqcX2VxleQhFbKNi+WF0an7/TeTXD283RlQ==", + "resolved": "2.5.2", + "contentHash": "w3Q45Rvva0z1KPtXN5j2DjY9VgBCdWT0mkkr+dZKVyzBtIxnIywzvbEFLJix/dzHdE3XYDXbzh5GfLJHGCDTUg==", "dependencies": { "NETStandard.Library": "1.6.1", - "xunit.extensibility.core": "[2.5.0]" + "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 5d83b110cc..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 ea8d806c4b..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.0, )", - "resolved": "2.5.0", - "contentHash": "f2V5wuAdoaq0mRTt9UBmPbVex9HcwFYn+y7WaKUz5Xpakcrv7lhtQWBJUWNY4N3Z+o+atDBLyAALM1QWx04C6Q==", + "requested": "[2.5.2, )", + "resolved": "2.5.2", + "contentHash": "cClLEtMhn9H85jdZILz564FkBHOUP1/KmpColguzWpzXDY8cFRRZ2gW58ahdWBznz8UzRabAUqY+5vZKia+AmQ==", "dependencies": { - "xunit.analyzers": "1.2.0", - "xunit.assert": "2.5.0", - "xunit.core": "[2.5.0]" + "xunit.analyzers": "1.4.0", + "xunit.assert": "2.5.2", + "xunit.core": "[2.5.2]" } }, "xunit.runner.visualstudio": { "type": "Direct", - "requested": "[2.5.0, )", - "resolved": "2.5.0", - "contentHash": "+Gp9vuC2431yPyKB15YrOTxCuEAErBQUTIs6CquumX1F073UaPHGW0VE/XVJLMh9W4sXdz3TBkcHdFWZrRn2Hw==" + "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.2.0", - "contentHash": "d3dehV/DASLRlR8stWQmbPPjfYC2tct50Evav+OlsJMkfFqkhYvzO1k0s81lk0px8O0knZU/FqC8SqbXOtn+hw==" + "resolved": "1.4.0", + "contentHash": "7ljnTJfFjz5zK+Jf0h2dd2QOSO6UmFizXsojv/x4QX7TU5vEgtKZPk9RvpkiuUqg2bddtNZufBoKQalsi7djfA==" }, "xunit.assert": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "wN84pKX5jzfpgJ0bB6arrCA/oelBeYLCpnQ9Wj5xGEVPydKzVSDY5tEatFLHE/rO0+0RC+I4H5igGE118jRh1w==", + "resolved": "2.5.2", + "contentHash": "dZNLJWG5HfMAvWBub7eDZwOkP4xuXJj1TSC2AP3bjzIFVGb8rD8xWTvgXlRBXtgPgH+I4Y5hz2MBQrGqUxjDDg==", "dependencies": { "NETStandard.Library": "1.6.1" } }, "xunit.core": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "dnV0Mn2s1C0y2m33AylQyMkEyhBQsL4R0302kwSGiEGuY3JwzEmhTa9pnghyMRPliYSs4fXfkEAP+5bKXryGFg==", + "resolved": "2.5.2", + "contentHash": "q1PBUBD1Zxbu5WvRfdpzjUHDzs9vr65gNptEGTQmXISXMXeMG9YPX29Z7oZB0wXSccUCtwQ9uQBd5bkaCMS7hQ==", "dependencies": { - "xunit.extensibility.core": "[2.5.0]", - "xunit.extensibility.execution": "[2.5.0]" + "xunit.extensibility.core": "[2.5.2]", + "xunit.extensibility.execution": "[2.5.2]" } }, "xunit.extensibility.core": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "xRm6NIV3i7I+LkjsAJ91Xz2fxJm/oMEi2CYq1G5HlGTgcK1Zo2wNbLO6nKX1VG5FZzXibSdoLwr/MofVvh3mFA==", + "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.0", - "contentHash": "7+v2Bvp+1ew1iMGQVb1glICi8jcNdHbRUX6Ru0dmJBViGdjiS7kyqcX2VxleQhFbKNi+WF0an7/TeTXD283RlQ==", + "resolved": "2.5.2", + "contentHash": "w3Q45Rvva0z1KPtXN5j2DjY9VgBCdWT0mkkr+dZKVyzBtIxnIywzvbEFLJix/dzHdE3XYDXbzh5GfLJHGCDTUg==", "dependencies": { "NETStandard.Library": "1.6.1", - "xunit.extensibility.core": "[2.5.0]" + "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 276a5df8f6..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 cbc69da24f..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.0, )", - "resolved": "2.5.0", - "contentHash": "f2V5wuAdoaq0mRTt9UBmPbVex9HcwFYn+y7WaKUz5Xpakcrv7lhtQWBJUWNY4N3Z+o+atDBLyAALM1QWx04C6Q==", + "requested": "[2.5.2, )", + "resolved": "2.5.2", + "contentHash": "cClLEtMhn9H85jdZILz564FkBHOUP1/KmpColguzWpzXDY8cFRRZ2gW58ahdWBznz8UzRabAUqY+5vZKia+AmQ==", "dependencies": { - "xunit.analyzers": "1.2.0", - "xunit.assert": "2.5.0", - "xunit.core": "[2.5.0]" + "xunit.analyzers": "1.4.0", + "xunit.assert": "2.5.2", + "xunit.core": "[2.5.2]" } }, "xunit.runner.visualstudio": { "type": "Direct", - "requested": "[2.5.0, )", - "resolved": "2.5.0", - "contentHash": "+Gp9vuC2431yPyKB15YrOTxCuEAErBQUTIs6CquumX1F073UaPHGW0VE/XVJLMh9W4sXdz3TBkcHdFWZrRn2Hw==" + "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.2.0", - "contentHash": "d3dehV/DASLRlR8stWQmbPPjfYC2tct50Evav+OlsJMkfFqkhYvzO1k0s81lk0px8O0knZU/FqC8SqbXOtn+hw==" + "resolved": "1.4.0", + "contentHash": "7ljnTJfFjz5zK+Jf0h2dd2QOSO6UmFizXsojv/x4QX7TU5vEgtKZPk9RvpkiuUqg2bddtNZufBoKQalsi7djfA==" }, "xunit.assert": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "wN84pKX5jzfpgJ0bB6arrCA/oelBeYLCpnQ9Wj5xGEVPydKzVSDY5tEatFLHE/rO0+0RC+I4H5igGE118jRh1w==", + "resolved": "2.5.2", + "contentHash": "dZNLJWG5HfMAvWBub7eDZwOkP4xuXJj1TSC2AP3bjzIFVGb8rD8xWTvgXlRBXtgPgH+I4Y5hz2MBQrGqUxjDDg==", "dependencies": { "NETStandard.Library": "1.6.1" } }, "xunit.core": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "dnV0Mn2s1C0y2m33AylQyMkEyhBQsL4R0302kwSGiEGuY3JwzEmhTa9pnghyMRPliYSs4fXfkEAP+5bKXryGFg==", + "resolved": "2.5.2", + "contentHash": "q1PBUBD1Zxbu5WvRfdpzjUHDzs9vr65gNptEGTQmXISXMXeMG9YPX29Z7oZB0wXSccUCtwQ9uQBd5bkaCMS7hQ==", "dependencies": { - "xunit.extensibility.core": "[2.5.0]", - "xunit.extensibility.execution": "[2.5.0]" + "xunit.extensibility.core": "[2.5.2]", + "xunit.extensibility.execution": "[2.5.2]" } }, "xunit.extensibility.core": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "xRm6NIV3i7I+LkjsAJ91Xz2fxJm/oMEi2CYq1G5HlGTgcK1Zo2wNbLO6nKX1VG5FZzXibSdoLwr/MofVvh3mFA==", + "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.0", - "contentHash": "7+v2Bvp+1ew1iMGQVb1glICi8jcNdHbRUX6Ru0dmJBViGdjiS7kyqcX2VxleQhFbKNi+WF0an7/TeTXD283RlQ==", + "resolved": "2.5.2", + "contentHash": "w3Q45Rvva0z1KPtXN5j2DjY9VgBCdWT0mkkr+dZKVyzBtIxnIywzvbEFLJix/dzHdE3XYDXbzh5GfLJHGCDTUg==", "dependencies": { "NETStandard.Library": "1.6.1", - "xunit.extensibility.core": "[2.5.0]" + "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 80f6cb0020..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 c290fcf286..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.0, )", - "resolved": "2.5.0", - "contentHash": "f2V5wuAdoaq0mRTt9UBmPbVex9HcwFYn+y7WaKUz5Xpakcrv7lhtQWBJUWNY4N3Z+o+atDBLyAALM1QWx04C6Q==", + "requested": "[2.5.2, )", + "resolved": "2.5.2", + "contentHash": "cClLEtMhn9H85jdZILz564FkBHOUP1/KmpColguzWpzXDY8cFRRZ2gW58ahdWBznz8UzRabAUqY+5vZKia+AmQ==", "dependencies": { - "xunit.analyzers": "1.2.0", - "xunit.assert": "2.5.0", - "xunit.core": "[2.5.0]" + "xunit.analyzers": "1.4.0", + "xunit.assert": "2.5.2", + "xunit.core": "[2.5.2]" } }, "xunit.runner.visualstudio": { "type": "Direct", - "requested": "[2.5.0, )", - "resolved": "2.5.0", - "contentHash": "+Gp9vuC2431yPyKB15YrOTxCuEAErBQUTIs6CquumX1F073UaPHGW0VE/XVJLMh9W4sXdz3TBkcHdFWZrRn2Hw==" + "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.2.0", - "contentHash": "d3dehV/DASLRlR8stWQmbPPjfYC2tct50Evav+OlsJMkfFqkhYvzO1k0s81lk0px8O0knZU/FqC8SqbXOtn+hw==" + "resolved": "1.4.0", + "contentHash": "7ljnTJfFjz5zK+Jf0h2dd2QOSO6UmFizXsojv/x4QX7TU5vEgtKZPk9RvpkiuUqg2bddtNZufBoKQalsi7djfA==" }, "xunit.assert": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "wN84pKX5jzfpgJ0bB6arrCA/oelBeYLCpnQ9Wj5xGEVPydKzVSDY5tEatFLHE/rO0+0RC+I4H5igGE118jRh1w==", + "resolved": "2.5.2", + "contentHash": "dZNLJWG5HfMAvWBub7eDZwOkP4xuXJj1TSC2AP3bjzIFVGb8rD8xWTvgXlRBXtgPgH+I4Y5hz2MBQrGqUxjDDg==", "dependencies": { "NETStandard.Library": "1.6.1" } }, "xunit.core": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "dnV0Mn2s1C0y2m33AylQyMkEyhBQsL4R0302kwSGiEGuY3JwzEmhTa9pnghyMRPliYSs4fXfkEAP+5bKXryGFg==", + "resolved": "2.5.2", + "contentHash": "q1PBUBD1Zxbu5WvRfdpzjUHDzs9vr65gNptEGTQmXISXMXeMG9YPX29Z7oZB0wXSccUCtwQ9uQBd5bkaCMS7hQ==", "dependencies": { - "xunit.extensibility.core": "[2.5.0]", - "xunit.extensibility.execution": "[2.5.0]" + "xunit.extensibility.core": "[2.5.2]", + "xunit.extensibility.execution": "[2.5.2]" } }, "xunit.extensibility.core": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "xRm6NIV3i7I+LkjsAJ91Xz2fxJm/oMEi2CYq1G5HlGTgcK1Zo2wNbLO6nKX1VG5FZzXibSdoLwr/MofVvh3mFA==", + "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.0", - "contentHash": "7+v2Bvp+1ew1iMGQVb1glICi8jcNdHbRUX6Ru0dmJBViGdjiS7kyqcX2VxleQhFbKNi+WF0an7/TeTXD283RlQ==", + "resolved": "2.5.2", + "contentHash": "w3Q45Rvva0z1KPtXN5j2DjY9VgBCdWT0mkkr+dZKVyzBtIxnIywzvbEFLJix/dzHdE3XYDXbzh5GfLJHGCDTUg==", "dependencies": { "NETStandard.Library": "1.6.1", - "xunit.extensibility.core": "[2.5.0]" + "xunit.extensibility.core": "[2.5.2]" } }, "library": { diff --git a/integrationtest/ValidationProject/Validation.csproj b/integrationtest/ValidationProject/Validation.csproj index b871c71362..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 4ed946601d..d9ab944eec 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -1,16 +1,16 @@ - + - + - + @@ -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 194e30d163..d2f8dc7de4 100644 --- a/src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json +++ b/src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json @@ -77,25 +77,25 @@ }, "xunit": { "type": "Direct", - "requested": "[2.5.0, )", - "resolved": "2.5.0", - "contentHash": "f2V5wuAdoaq0mRTt9UBmPbVex9HcwFYn+y7WaKUz5Xpakcrv7lhtQWBJUWNY4N3Z+o+atDBLyAALM1QWx04C6Q==", + "requested": "[2.5.2, )", + "resolved": "2.5.2", + "contentHash": "cClLEtMhn9H85jdZILz564FkBHOUP1/KmpColguzWpzXDY8cFRRZ2gW58ahdWBznz8UzRabAUqY+5vZKia+AmQ==", "dependencies": { - "xunit.analyzers": "1.2.0", - "xunit.assert": "2.5.0", - "xunit.core": "[2.5.0]" + "xunit.analyzers": "1.4.0", + "xunit.assert": "2.5.2", + "xunit.core": "[2.5.2]" } }, "xunit.runner.visualstudio": { "type": "Direct", - "requested": "[2.5.0, )", - "resolved": "2.5.0", - "contentHash": "+Gp9vuC2431yPyKB15YrOTxCuEAErBQUTIs6CquumX1F073UaPHGW0VE/XVJLMh9W4sXdz3TBkcHdFWZrRn2Hw==" + "requested": "[2.5.3, )", + "resolved": "2.5.3", + "contentHash": "HFFL6O+QLEOfs555SqHii48ovVa4CqGYanY+B32BjLpPptdE+wEJmCFNXlLHdEOD5LYeayb9EroaUpydGpcybg==" }, "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", @@ -1573,30 +1573,30 @@ }, "xunit.analyzers": { "type": "Transitive", - "resolved": "1.2.0", - "contentHash": "d3dehV/DASLRlR8stWQmbPPjfYC2tct50Evav+OlsJMkfFqkhYvzO1k0s81lk0px8O0knZU/FqC8SqbXOtn+hw==" + "resolved": "1.4.0", + "contentHash": "7ljnTJfFjz5zK+Jf0h2dd2QOSO6UmFizXsojv/x4QX7TU5vEgtKZPk9RvpkiuUqg2bddtNZufBoKQalsi7djfA==" }, "xunit.assert": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "wN84pKX5jzfpgJ0bB6arrCA/oelBeYLCpnQ9Wj5xGEVPydKzVSDY5tEatFLHE/rO0+0RC+I4H5igGE118jRh1w==", + "resolved": "2.5.2", + "contentHash": "dZNLJWG5HfMAvWBub7eDZwOkP4xuXJj1TSC2AP3bjzIFVGb8rD8xWTvgXlRBXtgPgH+I4Y5hz2MBQrGqUxjDDg==", "dependencies": { "NETStandard.Library": "1.6.1" } }, "xunit.core": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "dnV0Mn2s1C0y2m33AylQyMkEyhBQsL4R0302kwSGiEGuY3JwzEmhTa9pnghyMRPliYSs4fXfkEAP+5bKXryGFg==", + "resolved": "2.5.2", + "contentHash": "q1PBUBD1Zxbu5WvRfdpzjUHDzs9vr65gNptEGTQmXISXMXeMG9YPX29Z7oZB0wXSccUCtwQ9uQBd5bkaCMS7hQ==", "dependencies": { - "xunit.extensibility.core": "[2.5.0]", - "xunit.extensibility.execution": "[2.5.0]" + "xunit.extensibility.core": "[2.5.2]", + "xunit.extensibility.execution": "[2.5.2]" } }, "xunit.extensibility.core": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "xRm6NIV3i7I+LkjsAJ91Xz2fxJm/oMEi2CYq1G5HlGTgcK1Zo2wNbLO6nKX1VG5FZzXibSdoLwr/MofVvh3mFA==", + "resolved": "2.5.2", + "contentHash": "peV3Y8Pt3wNoIdHeeGClI4qKUeiEX0LuihAYqbAU0g99sidiPItMsUAURjkAoo3JqX5Lrsg+jiVukXp4Tijmfw==", "dependencies": { "NETStandard.Library": "1.6.1", "xunit.abstractions": "2.0.3" @@ -1604,72 +1604,72 @@ }, "xunit.extensibility.execution": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "7+v2Bvp+1ew1iMGQVb1glICi8jcNdHbRUX6Ru0dmJBViGdjiS7kyqcX2VxleQhFbKNi+WF0an7/TeTXD283RlQ==", + "resolved": "2.5.2", + "contentHash": "w3Q45Rvva0z1KPtXN5j2DjY9VgBCdWT0mkkr+dZKVyzBtIxnIywzvbEFLJix/dzHdE3XYDXbzh5GfLJHGCDTUg==", "dependencies": { "NETStandard.Library": "1.6.1", - "xunit.extensibility.core": "[2.5.0]" + "xunit.extensibility.core": "[2.5.2]" } }, "dotnet-stryker": { "type": "Project", "dependencies": { - "McMaster.Extensions.CommandLineUtils": "4.1.0", - "NuGet.Protocol": "6.7.0", - "YamlDotNet": "13.3.1", - "stryker": "3.10.0" + "McMaster.Extensions.CommandLineUtils": "[4.1.0, )", + "NuGet.Protocol": "[6.7.0, )", + "YamlDotNet": "[13.7.0, )", + "stryker": "[3.10.0, )" } }, "stryker": { "type": "Project", "dependencies": { - "Buildalyzer": "5.0.0", - "DotNet.Glob": "3.1.3", - "FSharp.Compiler.Service": "41.0.7", - "Grynwald.MarkdownGenerator": "3.0.106", - "LibGit2Sharp": "0.27.2", - "Microsoft.CodeAnalysis.CSharp": "4.7.0", - "Microsoft.Extensions.Logging": "7.0.0", - "Microsoft.TestPlatform": "17.7.2", - "Microsoft.TestPlatform.ObjectModel": "17.7.2", - "Microsoft.TestPlatform.Portable": "17.7.2", - "Microsoft.TestPlatform.TranslationLayer": "17.7.2", - "Microsoft.Web.LibraryManager.Build": "2.1.175", - "Mono.Cecil": "0.11.5", - "NuGet.Frameworks": "6.7.0", - "ResXResourceReader.NetStandard": "1.1.0", - "Serilog": "3.0.1", - "Serilog.Extensions.Logging": "7.0.0", - "Serilog.Extensions.Logging.File": "3.0.0", - "Serilog.Sinks.Console": "4.1.0", - "ShellProgressBar": "5.2.0", - "Spectre.Console": "0.47.0", - "Spectre.Console.Analyzer": "0.47.0", - "Stryker.DataCollector": "1.0.0", - "Stryker.RegexMutators": "1.0.0", - "TestableIO.System.IO.Abstractions.Wrappers": "19.2.69" + "Buildalyzer": "[5.0.1, )", + "DotNet.Glob": "[3.1.3, )", + "FSharp.Compiler.Service": "[41.0.7, )", + "Grynwald.MarkdownGenerator": "[3.0.106, )", + "LibGit2Sharp": "[0.27.2, )", + "Microsoft.CodeAnalysis.CSharp": "[4.7.0, )", + "Microsoft.Extensions.Logging": "[7.0.0, )", + "Microsoft.TestPlatform": "[17.7.2, )", + "Microsoft.TestPlatform.ObjectModel": "[17.7.2, )", + "Microsoft.TestPlatform.Portable": "[17.7.2, )", + "Microsoft.TestPlatform.TranslationLayer": "[17.7.2, )", + "Microsoft.Web.LibraryManager.Build": "[2.1.175, )", + "Mono.Cecil": "[0.11.5, )", + "NuGet.Frameworks": "[6.7.0, )", + "ResXResourceReader.NetStandard": "[1.1.0, )", + "Serilog": "[3.0.1, )", + "Serilog.Extensions.Logging": "[7.0.0, )", + "Serilog.Extensions.Logging.File": "[3.0.0, )", + "Serilog.Sinks.Console": "[4.1.0, )", + "ShellProgressBar": "[5.2.0, )", + "Spectre.Console": "[0.47.0, )", + "Spectre.Console.Analyzer": "[0.47.0, )", + "Stryker.DataCollector": "[3.10.0, )", + "Stryker.RegexMutators": "[3.10.0, )", + "TestableIO.System.IO.Abstractions.Wrappers": "[19.2.69, )" } }, "stryker.datacollector": { "type": "Project", "dependencies": { - "Microsoft.TestPlatform.ObjectModel": "17.7.2", - "Microsoft.TestPlatform.Portable": "17.7.2" + "Microsoft.TestPlatform.ObjectModel": "[17.7.2, )", + "Microsoft.TestPlatform.Portable": "[17.7.2, )" } }, "stryker.regexmutators": { "type": "Project", "dependencies": { - "RegexParser": "0.5.1" + "RegexParser": "[0.5.1, )" } }, "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", @@ -1917,10 +1917,10 @@ }, "YamlDotNet": { "type": "CentralTransitive", - "requested": "[13.3.1, )", - "resolved": "13.3.1", - "contentHash": "Q2dqDsb0xAlr092grgHk8/vTXI2snIiYM5ND3IXkgJDFIdPnqDYwYnlk+gwzSeRByDLhiSzTog8uT7xFwH68Zg==" + "requested": "[13.7.0, )", + "resolved": "13.7.0", + "contentHash": "RKkoQSCyk/94N20SL3U15hWAqBVXHu+59upcPi8R2uhrcAalyVa4Y/vYdXQ7MXQ71Lut//DH0tLcYByAkGmXhA==" } } } -} \ No newline at end of file +} diff --git a/src/Stryker.CLI/Stryker.CLI/packages.lock.json b/src/Stryker.CLI/Stryker.CLI/packages.lock.json index 6af9c5f5ce..bd9943fcd9 100644 --- a/src/Stryker.CLI/Stryker.CLI/packages.lock.json +++ b/src/Stryker.CLI/Stryker.CLI/packages.lock.json @@ -34,14 +34,14 @@ }, "YamlDotNet": { "type": "Direct", - "requested": "[13.3.1, )", - "resolved": "13.3.1", - "contentHash": "Q2dqDsb0xAlr092grgHk8/vTXI2snIiYM5ND3IXkgJDFIdPnqDYwYnlk+gwzSeRByDLhiSzTog8uT7xFwH68Zg==" + "requested": "[13.7.0, )", + "resolved": "13.7.0", + "contentHash": "RKkoQSCyk/94N20SL3U15hWAqBVXHu+59upcPi8R2uhrcAalyVa4Y/vYdXQ7MXQ71Lut//DH0tLcYByAkGmXhA==" }, "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,53 +1458,53 @@ "stryker": { "type": "Project", "dependencies": { - "Buildalyzer": "5.0.0", - "DotNet.Glob": "3.1.3", - "FSharp.Compiler.Service": "41.0.7", - "Grynwald.MarkdownGenerator": "3.0.106", - "LibGit2Sharp": "0.27.2", - "Microsoft.CodeAnalysis.CSharp": "4.7.0", - "Microsoft.Extensions.Logging": "7.0.0", - "Microsoft.TestPlatform": "17.7.2", - "Microsoft.TestPlatform.ObjectModel": "17.7.2", - "Microsoft.TestPlatform.Portable": "17.7.2", - "Microsoft.TestPlatform.TranslationLayer": "17.7.2", - "Microsoft.Web.LibraryManager.Build": "2.1.175", - "Mono.Cecil": "0.11.5", - "NuGet.Frameworks": "6.7.0", - "ResXResourceReader.NetStandard": "1.1.0", - "Serilog": "3.0.1", - "Serilog.Extensions.Logging": "7.0.0", - "Serilog.Extensions.Logging.File": "3.0.0", - "Serilog.Sinks.Console": "4.1.0", - "ShellProgressBar": "5.2.0", - "Spectre.Console": "0.47.0", - "Spectre.Console.Analyzer": "0.47.0", - "Stryker.DataCollector": "1.0.0", - "Stryker.RegexMutators": "1.0.0", - "TestableIO.System.IO.Abstractions.Wrappers": "19.2.69" + "Buildalyzer": "[5.0.1, )", + "DotNet.Glob": "[3.1.3, )", + "FSharp.Compiler.Service": "[41.0.7, )", + "Grynwald.MarkdownGenerator": "[3.0.106, )", + "LibGit2Sharp": "[0.27.2, )", + "Microsoft.CodeAnalysis.CSharp": "[4.7.0, )", + "Microsoft.Extensions.Logging": "[7.0.0, )", + "Microsoft.TestPlatform": "[17.7.2, )", + "Microsoft.TestPlatform.ObjectModel": "[17.7.2, )", + "Microsoft.TestPlatform.Portable": "[17.7.2, )", + "Microsoft.TestPlatform.TranslationLayer": "[17.7.2, )", + "Microsoft.Web.LibraryManager.Build": "[2.1.175, )", + "Mono.Cecil": "[0.11.5, )", + "NuGet.Frameworks": "[6.7.0, )", + "ResXResourceReader.NetStandard": "[1.1.0, )", + "Serilog": "[3.0.1, )", + "Serilog.Extensions.Logging": "[7.0.0, )", + "Serilog.Extensions.Logging.File": "[3.0.0, )", + "Serilog.Sinks.Console": "[4.1.0, )", + "ShellProgressBar": "[5.2.0, )", + "Spectre.Console": "[0.47.0, )", + "Spectre.Console.Analyzer": "[0.47.0, )", + "Stryker.DataCollector": "[3.10.0, )", + "Stryker.RegexMutators": "[3.10.0, )", + "TestableIO.System.IO.Abstractions.Wrappers": "[19.2.69, )" } }, "stryker.datacollector": { "type": "Project", "dependencies": { - "Microsoft.TestPlatform.ObjectModel": "17.7.2", - "Microsoft.TestPlatform.Portable": "17.7.2" + "Microsoft.TestPlatform.ObjectModel": "[17.7.2, )", + "Microsoft.TestPlatform.Portable": "[17.7.2, )" } }, "stryker.regexmutators": { "type": "Project", "dependencies": { - "RegexParser": "0.5.1" + "RegexParser": "[0.5.1, )" } }, "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", @@ -1734,4 +1734,4 @@ } } } -} \ No newline at end of file +} 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/Helpers/RangeHelperTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Helpers/RangeHelperTests.cs new file mode 100644 index 0000000000..fcdb406878 --- /dev/null +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Helpers/RangeHelperTests.cs @@ -0,0 +1,534 @@ +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 +{ + 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_NoContent() + { + 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, 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); + + 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() => 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 position = PositionModule.mkPos(row, col); + + var result = RangeHelper.GetIndex(text, position); + + result.ShouldBe(expectedIndex); + } + + 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.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.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.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/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] 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.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.UnitTest/packages.lock.json b/src/Stryker.Core/Stryker.Core.UnitTest/packages.lock.json index 2e513e70ed..513cb0bbdb 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": { @@ -86,20 +86,20 @@ }, "xunit": { "type": "Direct", - "requested": "[2.5.0, )", - "resolved": "2.5.0", - "contentHash": "f2V5wuAdoaq0mRTt9UBmPbVex9HcwFYn+y7WaKUz5Xpakcrv7lhtQWBJUWNY4N3Z+o+atDBLyAALM1QWx04C6Q==", + "requested": "[2.5.2, )", + "resolved": "2.5.2", + "contentHash": "cClLEtMhn9H85jdZILz564FkBHOUP1/KmpColguzWpzXDY8cFRRZ2gW58ahdWBznz8UzRabAUqY+5vZKia+AmQ==", "dependencies": { - "xunit.analyzers": "1.2.0", - "xunit.assert": "2.5.0", - "xunit.core": "[2.5.0]" + "xunit.analyzers": "1.4.0", + "xunit.assert": "2.5.2", + "xunit.core": "[2.5.2]" } }, "xunit.runner.visualstudio": { "type": "Direct", - "requested": "[2.5.0, )", - "resolved": "2.5.0", - "contentHash": "+Gp9vuC2431yPyKB15YrOTxCuEAErBQUTIs6CquumX1F073UaPHGW0VE/XVJLMh9W4sXdz3TBkcHdFWZrRn2Hw==" + "requested": "[2.5.3, )", + "resolved": "2.5.3", + "contentHash": "HFFL6O+QLEOfs555SqHii48ovVa4CqGYanY+B32BjLpPptdE+wEJmCFNXlLHdEOD5LYeayb9EroaUpydGpcybg==" }, "Xunit.SkippableFact": { "type": "Direct", @@ -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", @@ -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": { @@ -1549,30 +1549,30 @@ }, "xunit.analyzers": { "type": "Transitive", - "resolved": "1.2.0", - "contentHash": "d3dehV/DASLRlR8stWQmbPPjfYC2tct50Evav+OlsJMkfFqkhYvzO1k0s81lk0px8O0knZU/FqC8SqbXOtn+hw==" + "resolved": "1.4.0", + "contentHash": "7ljnTJfFjz5zK+Jf0h2dd2QOSO6UmFizXsojv/x4QX7TU5vEgtKZPk9RvpkiuUqg2bddtNZufBoKQalsi7djfA==" }, "xunit.assert": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "wN84pKX5jzfpgJ0bB6arrCA/oelBeYLCpnQ9Wj5xGEVPydKzVSDY5tEatFLHE/rO0+0RC+I4H5igGE118jRh1w==", + "resolved": "2.5.2", + "contentHash": "dZNLJWG5HfMAvWBub7eDZwOkP4xuXJj1TSC2AP3bjzIFVGb8rD8xWTvgXlRBXtgPgH+I4Y5hz2MBQrGqUxjDDg==", "dependencies": { "NETStandard.Library": "1.6.1" } }, "xunit.core": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "dnV0Mn2s1C0y2m33AylQyMkEyhBQsL4R0302kwSGiEGuY3JwzEmhTa9pnghyMRPliYSs4fXfkEAP+5bKXryGFg==", + "resolved": "2.5.2", + "contentHash": "q1PBUBD1Zxbu5WvRfdpzjUHDzs9vr65gNptEGTQmXISXMXeMG9YPX29Z7oZB0wXSccUCtwQ9uQBd5bkaCMS7hQ==", "dependencies": { - "xunit.extensibility.core": "[2.5.0]", - "xunit.extensibility.execution": "[2.5.0]" + "xunit.extensibility.core": "[2.5.2]", + "xunit.extensibility.execution": "[2.5.2]" } }, "xunit.extensibility.core": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "xRm6NIV3i7I+LkjsAJ91Xz2fxJm/oMEi2CYq1G5HlGTgcK1Zo2wNbLO6nKX1VG5FZzXibSdoLwr/MofVvh3mFA==", + "resolved": "2.5.2", + "contentHash": "peV3Y8Pt3wNoIdHeeGClI4qKUeiEX0LuihAYqbAU0g99sidiPItMsUAURjkAoo3JqX5Lrsg+jiVukXp4Tijmfw==", "dependencies": { "NETStandard.Library": "1.6.1", "xunit.abstractions": "2.0.3" @@ -1580,63 +1580,63 @@ }, "xunit.extensibility.execution": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "7+v2Bvp+1ew1iMGQVb1glICi8jcNdHbRUX6Ru0dmJBViGdjiS7kyqcX2VxleQhFbKNi+WF0an7/TeTXD283RlQ==", + "resolved": "2.5.2", + "contentHash": "w3Q45Rvva0z1KPtXN5j2DjY9VgBCdWT0mkkr+dZKVyzBtIxnIywzvbEFLJix/dzHdE3XYDXbzh5GfLJHGCDTUg==", "dependencies": { "NETStandard.Library": "1.6.1", - "xunit.extensibility.core": "[2.5.0]" + "xunit.extensibility.core": "[2.5.2]" } }, "stryker": { "type": "Project", "dependencies": { - "Buildalyzer": "5.0.0", - "DotNet.Glob": "3.1.3", - "FSharp.Compiler.Service": "41.0.7", - "Grynwald.MarkdownGenerator": "3.0.106", - "LibGit2Sharp": "0.27.2", - "Microsoft.CodeAnalysis.CSharp": "4.7.0", - "Microsoft.Extensions.Logging": "7.0.0", - "Microsoft.TestPlatform": "17.7.2", - "Microsoft.TestPlatform.ObjectModel": "17.7.2", - "Microsoft.TestPlatform.Portable": "17.7.2", - "Microsoft.TestPlatform.TranslationLayer": "17.7.2", - "Microsoft.Web.LibraryManager.Build": "2.1.175", - "Mono.Cecil": "0.11.5", - "NuGet.Frameworks": "6.7.0", - "ResXResourceReader.NetStandard": "1.1.0", - "Serilog": "3.0.1", - "Serilog.Extensions.Logging": "7.0.0", - "Serilog.Extensions.Logging.File": "3.0.0", - "Serilog.Sinks.Console": "4.1.0", - "ShellProgressBar": "5.2.0", - "Spectre.Console": "0.47.0", - "Spectre.Console.Analyzer": "0.47.0", - "Stryker.DataCollector": "1.0.0", - "Stryker.RegexMutators": "1.0.0", - "TestableIO.System.IO.Abstractions.Wrappers": "19.2.69" + "Buildalyzer": "[5.0.1, )", + "DotNet.Glob": "[3.1.3, )", + "FSharp.Compiler.Service": "[41.0.7, )", + "Grynwald.MarkdownGenerator": "[3.0.106, )", + "LibGit2Sharp": "[0.27.2, )", + "Microsoft.CodeAnalysis.CSharp": "[4.7.0, )", + "Microsoft.Extensions.Logging": "[7.0.0, )", + "Microsoft.TestPlatform": "[17.7.2, )", + "Microsoft.TestPlatform.ObjectModel": "[17.7.2, )", + "Microsoft.TestPlatform.Portable": "[17.7.2, )", + "Microsoft.TestPlatform.TranslationLayer": "[17.7.2, )", + "Microsoft.Web.LibraryManager.Build": "[2.1.175, )", + "Mono.Cecil": "[0.11.5, )", + "NuGet.Frameworks": "[6.7.0, )", + "ResXResourceReader.NetStandard": "[1.1.0, )", + "Serilog": "[3.0.1, )", + "Serilog.Extensions.Logging": "[7.0.0, )", + "Serilog.Extensions.Logging.File": "[3.0.0, )", + "Serilog.Sinks.Console": "[4.1.0, )", + "ShellProgressBar": "[5.2.0, )", + "Spectre.Console": "[0.47.0, )", + "Spectre.Console.Analyzer": "[0.47.0, )", + "Stryker.DataCollector": "[3.10.0, )", + "Stryker.RegexMutators": "[3.10.0, )", + "TestableIO.System.IO.Abstractions.Wrappers": "[19.2.69, )" } }, "stryker.datacollector": { "type": "Project", "dependencies": { - "Microsoft.TestPlatform.ObjectModel": "17.7.2", - "Microsoft.TestPlatform.Portable": "17.7.2" + "Microsoft.TestPlatform.ObjectModel": "[17.7.2, )", + "Microsoft.TestPlatform.Portable": "[17.7.2, )" } }, "stryker.regexmutators": { "type": "Project", "dependencies": { - "RegexParser": "0.5.1" + "RegexParser": "[0.5.1, )" } }, "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", @@ -1866,4 +1866,4 @@ } } } -} \ No newline at end of file +} diff --git a/src/Stryker.Core/Stryker.Core/Compiling/CsharpCompilingProcess.cs b/src/Stryker.Core/Stryker.Core/Compiling/CsharpCompilingProcess.cs index 816e9013dd..792a6031e3 100644 --- a/src/Stryker.Core/Stryker.Core/Compiling/CsharpCompilingProcess.cs +++ b/src/Stryker.Core/Stryker.Core/Compiling/CsharpCompilingProcess.cs @@ -1,6 +1,8 @@ +using System; using System.Collections.Generic; using System.IO; using System.Linq; +using System.Text; using Buildalyzer; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; @@ -74,6 +76,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 +157,6 @@ private CSharpCompilation RunSourceGenerators(IAnalyzerResult analyzerResult, Co null, null), options: emitOptions); - LogEmitResult(emitResult); return (rollbackProcessResult, emitResult, retryCount+1); @@ -168,7 +170,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 +179,25 @@ private void LogEmitResult(EmitResult result) } } + private void DumpErrorDetails(IEnumerable diagnostics) + { + var messageBuilder = new StringBuilder(); + var materializedDiagnostics = diagnostics.ToArray(); + if (!materializedDiagnostics.Any()) + { + messageBuilder.Append("Unfortunately there is no more info available, good luck!"); + } + + foreach (var diagnostic in materializedDiagnostics) + { + messageBuilder + .Append(Environment.NewLine) + .Append(diagnostic.Id).Append(": ").AppendLine(diagnostic.ToString()); + } + + _logger.LogTrace("An unrecoverable compilation error occurred: {Diagnostics}", messageBuilder.ToString()); + } + private static string ReadableNumber(int number) => number switch { 1 => "first", 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 49fe5facfa..44f7fb1dd2 100644 --- a/src/Stryker.Core/Stryker.Core/FilePattern.cs +++ b/src/Stryker.Core/Stryker.Core/FilePattern.cs @@ -1,10 +1,9 @@ using DotNet.Globbing; using Microsoft.CodeAnalysis.Text; -using Stryker.Core.ProjectComponents; +using Stryker.Core.Helpers; 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/Helpers/RangeHelper.cs b/src/Stryker.Core/Stryker.Core/Helpers/RangeHelper.cs new file mode 100644 index 0000000000..6ce39176fd --- /dev/null +++ b/src/Stryker.Core/Stryker.Core/Helpers/RangeHelper.cs @@ -0,0 +1,198 @@ +using System.Collections.Generic; +using System.IO; +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.Find(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; + + using var reader = new StringReader(text); + var currentIndex = 0; + do + { + string? latestLineContent = reader.ReadLine(); + if (latestLineContent == null) break; + + var lengthOfThisLine = latestLineContent.Length; + var endOfLineIndex = currentIndex + lengthOfThisLine; + var indexIsOnThisLine = index <= endOfLineIndex && index >= currentIndex; + if (indexIsOnThisLine) + { + var indexOnThisLine = index - currentIndex; + return PositionModule.mkPos(line, indexOnThisLine); + } + + var thisWasTheLastLine = reader.Peek() == -1; + if (thisWasTheLastLine) + { + return PositionModule.mkPos(line, lengthOfThisLine); + } + + line++; + currentIndex += lengthOfThisLine; + } while (currentIndex < text.Length); + + return PositionModule.mkPos(0, 0); + } + + public static int GetIndex(string text, Position pos) + { + using var reader = new StringReader(text); + string? latestLineContent = ""; + var currentIndex = 0; + for (var line = 0; line <= pos.Line; ++line) + { + if (latestLineContent == null) + { + break; + } + currentIndex += latestLineContent.Length; + latestLineContent = reader.ReadLine(); + } + + if (latestLineContent != null && pos.Column < latestLineContent.Length) + { + return currentIndex + pos.Column; + } + + 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..52058976de --- /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.Find(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/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)) { 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..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)); @@ -370,6 +370,7 @@ private ProjectComponentsBuilder GetProjectComponentBuilder( Language.Fsharp => new FsharpProjectComponentsBuilder( projectInfo, + options, _foldersToExclude, _logger, FileSystem), 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); } 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; 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/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) 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/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(); diff --git a/src/Stryker.Core/Stryker.Core/Options/StrykerOptions.cs b/src/Stryker.Core/Stryker.Core/Options/StrykerOptions.cs index 5ec8be761d..d6b43c42ba 100644 --- a/src/Stryker.Core/Stryker.Core/Options/StrykerOptions.cs +++ b/src/Stryker.Core/Stryker.Core/Options/StrykerOptions.cs @@ -158,7 +158,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. 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(); - } - } } } 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); + } } } } diff --git a/src/Stryker.Core/Stryker.Core/packages.lock.json b/src/Stryker.Core/Stryker.Core/packages.lock.json index d6e23ea6ec..39dd545f0d 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", diff --git a/src/Stryker.RegexMutators/Stryker.RegexMutators.UnitTest/packages.lock.json b/src/Stryker.RegexMutators/Stryker.RegexMutators.UnitTest/packages.lock.json index 57d41d6b8f..f6f3fbaa54 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.2, )", + "resolved": "2.5.2", + "contentHash": "cClLEtMhn9H85jdZILz564FkBHOUP1/KmpColguzWpzXDY8cFRRZ2gW58ahdWBznz8UzRabAUqY+5vZKia+AmQ==", "dependencies": { - "xunit.analyzers": "1.2.0", - "xunit.assert": "2.5.0", - "xunit.core": "[2.5.0]" + "xunit.analyzers": "1.4.0", + "xunit.assert": "2.5.2", + "xunit.core": "[2.5.2]" } }, "xunit.runner.visualstudio": { "type": "Direct", - "requested": "[2.5.0, )", - "resolved": "2.5.0", - "contentHash": "+Gp9vuC2431yPyKB15YrOTxCuEAErBQUTIs6CquumX1F073UaPHGW0VE/XVJLMh9W4sXdz3TBkcHdFWZrRn2Hw==" + "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.2.0", - "contentHash": "d3dehV/DASLRlR8stWQmbPPjfYC2tct50Evav+OlsJMkfFqkhYvzO1k0s81lk0px8O0knZU/FqC8SqbXOtn+hw==" + "resolved": "1.4.0", + "contentHash": "7ljnTJfFjz5zK+Jf0h2dd2QOSO6UmFizXsojv/x4QX7TU5vEgtKZPk9RvpkiuUqg2bddtNZufBoKQalsi7djfA==" }, "xunit.assert": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "wN84pKX5jzfpgJ0bB6arrCA/oelBeYLCpnQ9Wj5xGEVPydKzVSDY5tEatFLHE/rO0+0RC+I4H5igGE118jRh1w==", + "resolved": "2.5.2", + "contentHash": "dZNLJWG5HfMAvWBub7eDZwOkP4xuXJj1TSC2AP3bjzIFVGb8rD8xWTvgXlRBXtgPgH+I4Y5hz2MBQrGqUxjDDg==", "dependencies": { "NETStandard.Library": "1.6.1" } }, "xunit.core": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "dnV0Mn2s1C0y2m33AylQyMkEyhBQsL4R0302kwSGiEGuY3JwzEmhTa9pnghyMRPliYSs4fXfkEAP+5bKXryGFg==", + "resolved": "2.5.2", + "contentHash": "q1PBUBD1Zxbu5WvRfdpzjUHDzs9vr65gNptEGTQmXISXMXeMG9YPX29Z7oZB0wXSccUCtwQ9uQBd5bkaCMS7hQ==", "dependencies": { - "xunit.extensibility.core": "[2.5.0]", - "xunit.extensibility.execution": "[2.5.0]" + "xunit.extensibility.core": "[2.5.2]", + "xunit.extensibility.execution": "[2.5.2]" } }, "xunit.extensibility.core": { "type": "Transitive", - "resolved": "2.5.0", - "contentHash": "xRm6NIV3i7I+LkjsAJ91Xz2fxJm/oMEi2CYq1G5HlGTgcK1Zo2wNbLO6nKX1VG5FZzXibSdoLwr/MofVvh3mFA==", + "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.0", - "contentHash": "7+v2Bvp+1ew1iMGQVb1glICi8jcNdHbRUX6Ru0dmJBViGdjiS7kyqcX2VxleQhFbKNi+WF0an7/TeTXD283RlQ==", + "resolved": "2.5.2", + "contentHash": "w3Q45Rvva0z1KPtXN5j2DjY9VgBCdWT0mkkr+dZKVyzBtIxnIywzvbEFLJix/dzHdE3XYDXbzh5GfLJHGCDTUg==", "dependencies": { "NETStandard.Library": "1.6.1", - "xunit.extensibility.core": "[2.5.0]" + "xunit.extensibility.core": "[2.5.2]" } }, "stryker.regexmutators": {