Skip to content

Commit

Permalink
Reorganize the src folder (#1289)
Browse files Browse the repository at this point in the history
  • Loading branch information
martintmk authored Jun 14, 2023
1 parent a77a5d9 commit cd9c59e
Show file tree
Hide file tree
Showing 329 changed files with 141 additions and 154 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"dotnet.defaultSolution": "src\\Polly.sln"
"dotnet.defaultSolution": "Polly.sln"
}
26 changes: 26 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<Project>
<Import Project="$(MsBuildThisFileDirectory)eng/Common.targets" />
<Import Project="$(MsBuildThisFileDirectory)eng/$(ProjectType).targets" Condition="$(ProjectType) != ''" />

<ItemGroup>
<Using Include="System.Collections" />
<Using Include="System.Collections.Concurrent" />
<Using Include="System.Diagnostics" />
<Using Include="System.Reflection" />
<Using Remove="System.Net.Http" />
</ItemGroup>

<ItemGroup Condition="'$(IncludePollyUsings)' == 'true'">
<Using Include="Polly.Bulkhead" />
<Using Include="Polly.Caching" />
<Using Include="Polly.CircuitBreaker" />
<Using Include="Polly.Fallback" />
<Using Include="Polly.NoOp" />
<Using Include="Polly.RateLimit" />
<Using Include="Polly.Registry" />
<Using Include="Polly.Retry" />
<Using Include="Polly.Timeout" />
<Using Include="Polly.Utilities" />
<Using Include="Polly.Wrap" />
</ItemGroup>
</Project>
4 changes: 3 additions & 1 deletion src/Directory.Packages.props → Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="coverlet.msbuild" Version="6.0.0" />
<PackageVersion Include="BenchmarkDotNet" Version="0.13.5" />
<PackageVersion Include="FluentAssertions" Version="6.11.0" />
<PackageVersion Include="GitHubActionsTestLogger" Version="2.3.2" />
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="1.0.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="7.0.1" />
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="7.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
Expand Down
63 changes: 40 additions & 23 deletions src/Polly.sln → Polly.sln
Original file line number Diff line number Diff line change
Expand Up @@ -6,48 +6,54 @@ MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{79FE9DBE-1155-4F78-A41F-FE95DEFA19DD}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
..\eng\Analyzers.targets = ..\eng\Analyzers.targets
..\build.cake = ..\build.cake
..\.github\workflows\build.yml = ..\.github\workflows\build.yml
..\.github\dependabot.yml = ..\.github\dependabot.yml
eng\Analyzers.targets = eng\Analyzers.targets
build.cake = build.cake
.github\workflows\build.yml = .github\workflows\build.yml
.github\dependabot.yml = .github\dependabot.yml
Directory.Build.props = Directory.Build.props
Directory.Build.targets = Directory.Build.targets
Directory.Packages.props = Directory.Packages.props
..\GitVersion.yml = ..\GitVersion.yml
..\global.json = ..\global.json
..\README.md = ..\README.md
..\Version.props = ..\Version.props
GitVersion.yml = GitVersion.yml
global.json = global.json
README.md = README.md
Version.props = Version.props
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Polly", "Polly\Polly.csproj", "{E273E6D8-87D4-4EC9-A2BE-734DD633EF15}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Polly", "src\Polly\Polly.csproj", "{E273E6D8-87D4-4EC9-A2BE-734DD633EF15}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Polly.Specs", "Polly.Specs\Polly.Specs.csproj", "{F771DF22-5684-43DF-B574-D76C35202AF4}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Polly.Specs", "test\Polly.Specs\Polly.Specs.csproj", "{F771DF22-5684-43DF-B574-D76C35202AF4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Polly.Benchmarks", "Polly.Benchmarks\Polly.Benchmarks.csproj", "{BED2624C-E418-4177-8696-0242363FFD43}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Polly.Benchmarks", "bench\Polly.Benchmarks\Polly.Benchmarks.csproj", "{BED2624C-E418-4177-8696-0242363FFD43}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Polly.Core", "Polly.Core\Polly.Core.csproj", "{E3831CE2-795D-4979-BB48-1C88CBF66651}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Polly.Core", "src\Polly.Core\Polly.Core.csproj", "{E3831CE2-795D-4979-BB48-1C88CBF66651}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Polly.Core.Tests", "Polly.Core.Tests\Polly.Core.Tests.csproj", "{AF1383E7-BABF-492A-91C8-F2789AE7B3B4}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Polly.Core.Tests", "test\Polly.Core.Tests\Polly.Core.Tests.csproj", "{AF1383E7-BABF-492A-91C8-F2789AE7B3B4}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "eng", "eng", "{04E3C7C5-31F7-4CD6-8BEC-C1032527D231}"
ProjectSection(SolutionItems) = preProject
..\eng\Analyzers.targets = ..\eng\Analyzers.targets
..\eng\Common.targets = ..\eng\Common.targets
..\eng\Library.targets = ..\eng\Library.targets
..\eng\Test.targets = ..\eng\Test.targets
eng\Analyzers.targets = eng\Analyzers.targets
eng\Common.targets = eng\Common.targets
eng\Library.targets = eng\Library.targets
eng\Test.targets = eng\Test.targets
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Polly.Core.Benchmarks", "Polly.Core.Benchmarks\Polly.Core.Benchmarks.csproj", "{CC306C35-E3BC-4F0B-AB8C-B9D4C82DC3DE}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Polly.Core.Benchmarks", "bench\Polly.Core.Benchmarks\Polly.Core.Benchmarks.csproj", "{CC306C35-E3BC-4F0B-AB8C-B9D4C82DC3DE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Polly.Extensions", "Polly.Extensions\Polly.Extensions.csproj", "{F2FDE6BF-DA86-4DDE-A55C-E2A064CD30D8}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Polly.Extensions", "src\Polly.Extensions\Polly.Extensions.csproj", "{F2FDE6BF-DA86-4DDE-A55C-E2A064CD30D8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Polly.Extensions.Tests", "Polly.Extensions.Tests\Polly.Extensions.Tests.csproj", "{BB2843CA-B518-48A1-BAD9-B63238F21608}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Polly.Extensions.Tests", "test\Polly.Extensions.Tests\Polly.Extensions.Tests.csproj", "{BB2843CA-B518-48A1-BAD9-B63238F21608}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Polly.RateLimiting", "Polly.RateLimiting\Polly.RateLimiting.csproj", "{BCA09595-A4D3-4D74-AC80-3E7017E51B24}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Polly.RateLimiting", "src\Polly.RateLimiting\Polly.RateLimiting.csproj", "{BCA09595-A4D3-4D74-AC80-3E7017E51B24}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Polly.RateLimiting.Tests", "Polly.RateLimiting.Tests\Polly.RateLimiting.Tests.csproj", "{06070F42-6738-4D0B-8D7E-9400B4030193}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Polly.RateLimiting.Tests", "test\Polly.RateLimiting.Tests\Polly.RateLimiting.Tests.csproj", "{06070F42-6738-4D0B-8D7E-9400B4030193}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Polly.TestUtils", "Polly.TestUtils\Polly.TestUtils.csproj", "{C04DEE61-C1EA-4028-B457-CDBD304B8ED9}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Polly.TestUtils", "test\Polly.TestUtils\Polly.TestUtils.csproj", "{C04DEE61-C1EA-4028-B457-CDBD304B8ED9}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "bench", "bench", "{71C259E7-08A4-4A91-AA8C-ECE726893507}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{A6CC41B9-E0B9-44F8-916B-3E4A78DA3BFB}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{B7BF406B-B06F-4025-83E6-7219C53196A6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -104,7 +110,18 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{E273E6D8-87D4-4EC9-A2BE-734DD633EF15} = {B7BF406B-B06F-4025-83E6-7219C53196A6}
{F771DF22-5684-43DF-B574-D76C35202AF4} = {A6CC41B9-E0B9-44F8-916B-3E4A78DA3BFB}
{BED2624C-E418-4177-8696-0242363FFD43} = {71C259E7-08A4-4A91-AA8C-ECE726893507}
{E3831CE2-795D-4979-BB48-1C88CBF66651} = {B7BF406B-B06F-4025-83E6-7219C53196A6}
{AF1383E7-BABF-492A-91C8-F2789AE7B3B4} = {A6CC41B9-E0B9-44F8-916B-3E4A78DA3BFB}
{04E3C7C5-31F7-4CD6-8BEC-C1032527D231} = {79FE9DBE-1155-4F78-A41F-FE95DEFA19DD}
{CC306C35-E3BC-4F0B-AB8C-B9D4C82DC3DE} = {71C259E7-08A4-4A91-AA8C-ECE726893507}
{F2FDE6BF-DA86-4DDE-A55C-E2A064CD30D8} = {B7BF406B-B06F-4025-83E6-7219C53196A6}
{BB2843CA-B518-48A1-BAD9-B63238F21608} = {A6CC41B9-E0B9-44F8-916B-3E4A78DA3BFB}
{BCA09595-A4D3-4D74-AC80-3E7017E51B24} = {B7BF406B-B06F-4025-83E6-7219C53196A6}
{06070F42-6738-4D0B-8D7E-9400B4030193} = {A6CC41B9-E0B9-44F8-916B-3E4A78DA3BFB}
{C04DEE61-C1EA-4028-B457-CDBD304B8ED9} = {A6CC41B9-E0B9-44F8-916B-3E4A78DA3BFB}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {2E5D54CD-770A-4345-B585-1848FC2EA6F4}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@
<OutputType>Exe</OutputType>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<Nullable>enable</Nullable>
<ProjectType>Benchmark</ProjectType>
<NoWarn>$(NoWarn);CA1822;SA1414;IDE0060</NoWarn>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" />
</ItemGroup>

<ItemGroup Condition=" '$(BenchmarkFromNuGet)' != 'True' ">
<ProjectReference Include="..\Polly\Polly.csproj" />
<ProjectReference Include="..\..\src\Polly\Polly.csproj" />
</ItemGroup>
</Project>
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
BenchmarkRunner.Run(Assembly.GetCallingAssembly(), args: args);
BenchmarkRunner.Run(Assembly.GetCallingAssembly(), args: args);
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ internal static class Workloads
{
internal static void Action()
{
// nothing
}

internal static Task ActionAsync() =>
Expand All @@ -12,13 +13,15 @@ internal static Task ActionAsync() =>
internal static Task ActionAsync(CancellationToken cancellationToken) =>
Task.CompletedTask;

#pragma warning disable S2190
internal static async Task ActionInfiniteAsync()
{
while (true)
{
await Task.Yield();
}
}
#pragma warning restore S2190

internal static async Task ActionInfiniteAsync(CancellationToken cancellationToken)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using BenchmarkDotNet.Attributes;

namespace Polly.Core.Benchmarks;

public class BridgeBenchmark
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using BenchmarkDotNet.Attributes;

namespace Polly.Core.Benchmarks;

public class CircuitBreakerBenchmark
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using BenchmarkDotNet.Attributes;

namespace Polly.Core.Benchmarks;

public class CircuitBreakerOpenedBenchmark
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Runtime.CompilerServices;
using BenchmarkDotNet.Attributes;

namespace Polly.Core.Benchmarks;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using BenchmarkDotNet.Attributes;

namespace Polly.Core.Benchmarks;

public class HedgingBenchmark
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using BenchmarkDotNet.Attributes;

namespace Polly.Core.Benchmarks;

public class MultipleStrategiesBenchmark
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using BenchmarkDotNet.Attributes;

namespace Polly.Core.Benchmarks;

public class PipelineBenchmark
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0</TargetFrameworks>
<ImplicitUsings>true</ImplicitUsings>
<ProjectType>Benchmark</ProjectType>
<Nullable>enable</Nullable>
<OutputType>Exe</OutputType>
<UseDefaultAnalyzers>true</UseDefaultAnalyzers>
<NoWarn>$(NoWarn);SA1600</NoWarn>
</PropertyGroup>

<ItemGroup>
<Using Include="Polly.Core.Benchmarks" />
<Using Include="Polly.Core.Benchmarks.Utils" />
<ProjectReference Include="..\Polly.Core\Polly.Core.csproj" />
<ProjectReference Include="..\Polly.Extensions\Polly.Extensions.csproj" />
<ProjectReference Include="..\Polly.RateLimiting\Polly.RateLimiting.csproj" />
<ProjectReference Include="..\Polly\Polly.csproj" />
<ProjectReference Include="..\..\src\Polly.Core\Polly.Core.csproj" />
<ProjectReference Include="..\..\src\Polly.Extensions\Polly.Extensions.csproj" />
<ProjectReference Include="..\..\src\Polly.RateLimiting\Polly.RateLimiting.csproj" />
<ProjectReference Include="..\..\src\Polly\Polly.csproj" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
</ItemGroup>

</Project>
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Diagnosers;
using BenchmarkDotNet.Jobs;
using BenchmarkDotNet.Running;
using BenchmarkDotNet.Toolchains.InProcess.Emit;
using Polly.Core.Benchmarks;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using BenchmarkDotNet.Attributes;

namespace Polly.Core.Benchmarks;

public class RateLimiterBenchmark
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Runtime.CompilerServices;
using BenchmarkDotNet.Attributes;

namespace Polly.Core.Benchmarks;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using BenchmarkDotNet.Attributes;
using Microsoft.Extensions.DependencyInjection;

namespace Polly.Core.Benchmarks;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using BenchmarkDotNet.Attributes;

namespace Polly.Core.Benchmarks;

public class RetryBenchmark
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using BenchmarkDotNet.Attributes;
using Microsoft.Extensions.Logging.Abstractions;

namespace Polly.Core.Benchmarks;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using BenchmarkDotNet.Attributes;

namespace Polly.Core.Benchmarks;

public class TimeoutBenchmark
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/Polly.Core.Benchmarks/README.md → bench/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Benchmarks

To run the benchmarks, use the `benchmarks.ps1` script in the root of the repository:
To run the benchmarks, use the `benchmarks.ps1` script in this repository:

``` powershell
# Run all benchmarks
Expand All @@ -10,6 +10,6 @@ To run the benchmarks, use the `benchmarks.ps1` script in the root of the reposi
./benchmarks.ps1 -Interactive
```

The benchmark results are stored in [`BenchmarkDotNet.Artifacts/results`](../../BenchmarkDotNet.Artifacts/results/) folder.
The benchmark results are stored in [`BenchmarkDotNet.Artifacts/results`](BenchmarkDotNet.Artifacts/results/) folder.

Run the benchmarks when your changes are significant enough to make sense running them. We do not use fixed hardware so your numbers might differ, however the important is the `Ratio` and `Alloc Ratio` which stays around the same or improves (ideally) between runs.
2 changes: 1 addition & 1 deletion benchmarks.ps1 → bench/benchmarks.ps1
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if ($Interactive -ne $true) {
$additionalArgs += "*"
}

$project = Join-Path "src" "Polly.Core.Benchmarks" "Polly.Core.Benchmarks.csproj"
$project = Join-Path "Polly.Core.Benchmarks" "Polly.Core.Benchmarks.csproj"

dotnet run --configuration $Configuration --framework net7.0 --project $project $additionalArgs

Expand Down
26 changes: 17 additions & 9 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ var testResultsDir = System.IO.Path.Combine(artifactsDir, Directory("test-result
var nupkgDestDir = System.IO.Path.Combine(artifactsDir, Directory("nuget-packages"));

// Stryker / Mutation Testing
var strykerConfig = File("./eng/stryker-config.json");
var strykerOutput = Directory("StrykerOutput");
var strykerConfig = MakeAbsolute(File("./eng/stryker-config.json"));
var strykerOutput = MakeAbsolute(Directory("StrykerOutput"));

///////////////////////////////////////////////////////////////////////////////
// SETUP / TEARDOWN
Expand Down Expand Up @@ -135,7 +135,7 @@ Task("__RunTests")
loggers = new[] { "GitHubActions;report-warnings=false" };
}

var projects = GetFiles("./src/**/*.Tests.csproj").Concat(GetFiles("./src/**/*.Specs.csproj"));
var projects = GetFiles("./test/**/*.csproj");

foreach(var proj in projects)
{
Expand All @@ -151,7 +151,7 @@ Task("__RunTests")
});

Task("__RunMutationTests")
.Does(() =>
.Does((context) =>
{
var runMutationTests = EnvironmentVariable("RUN_MUTATION_TESTS") switch
{
Expand All @@ -164,12 +164,17 @@ Task("__RunMutationTests")
return;
}

TestProject(File("./src/Polly.Core/Polly.Core.csproj"), File("./src/Polly.Core.Tests/Polly.Core.Tests.csproj"), "Polly.Core.csproj");
TestProject(File("./src/Polly.RateLimiting/Polly.RateLimiting.csproj"), File("./src/Polly.RateLimiting.Tests/Polly.RateLimiting.Tests.csproj"), "Polly.RateLimiting.csproj");
TestProject(File("./src/Polly.Extensions/Polly.Extensions.csproj"), File("./src/Polly.Extensions.Tests/Polly.Extensions.Tests.csproj"), "Polly.Extensions.csproj");
var oldDirectory = context.Environment.WorkingDirectory;
context.Environment.WorkingDirectory = MakeAbsolute(Directory("test"));

TestProject(File("../src/Polly.Core/Polly.Core.csproj"), File("./Polly.Core.Tests/Polly.Core.Tests.csproj"), "Polly.Core.csproj");
TestProject(File("../src/Polly.RateLimiting/Polly.RateLimiting.csproj"), File("./Polly.RateLimiting.Tests/Polly.RateLimiting.Tests.csproj"), "Polly.RateLimiting.csproj");
TestProject(File("../src/Polly.Extensions/Polly.Extensions.csproj"), File("./Polly.Extensions.Tests/Polly.Extensions.Tests.csproj"), "Polly.Extensions.csproj");

TestProject(File("./src/Polly/Polly.csproj"), File("./src/Polly.Specs/Polly.Specs.csproj"), "Polly.csproj");
TestProject(File("../src/Polly/Polly.csproj"), File("./Polly.Specs/Polly.Specs.csproj"), "Polly.csproj");

context.Environment.WorkingDirectory = oldDirectory;

void TestProject(FilePath proj, FilePath testProj, string project)
{
var dotNetBuildSettings = new DotNetBuildSettings
Expand All @@ -186,7 +191,10 @@ Task("__RunMutationTests")
var score = int.Parse(mutationScore);

Information($"Running mutation tests for '{proj}'. Test Project: '{testProj}'");
var result = StartProcess("dotnet", $"{strykerPath} --project {project} --test-project {testProj} --break-at {score} --config-file {strykerConfig} --output {strykerOutput}/{project}");

var args = $"{strykerPath} --project {project} --test-project {testProj.FullPath} --break-at {score} --config-file {strykerConfig} --output {strykerOutput}/{project}";

var result = StartProcess("dotnet", args);
if (result != 0)
{
throw new InvalidOperationException($"The mutation testing of '{project}' project failed.");
Expand Down
3 changes: 1 addition & 2 deletions eng/Analyzers.targets
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<Project>
<ItemGroup Label="Analyzers" Condition="$(UseDefaultAnalyzers) == 'true'">
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" PrivateAssets="All" />
<ItemGroup Label="Analyzers">
<PackageReference Include="SonarAnalyzer.CSharp" PrivateAssets="All" />
<PackageReference Include="StyleCop.Analyzers" PrivateAssets="All" IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" />
<AdditionalFiles Include="$(MsBuildThisFileDirectory)analyzers\Stylecop.json" Visible="false" />
Expand Down
Loading

0 comments on commit cd9c59e

Please sign in to comment.