Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
</PropertyGroup>
<ItemGroup>
<GlobalPackageReference Include="CSharpier.MSBuild" Version="1.3.0" />
<GlobalPackageReference Include="CSharpier.MSBuild" Version="1.4.0" />
<GlobalPackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="5.6.0" />
<GlobalPackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="10.0.403" />
<GlobalPackageReference Include="Microsoft.SourceLink.GitHub" Version="10.0.403" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,8 @@ private static async ValueTask DeleteDiretoryAsync(DirectoryInfo directory)
try
{
await Parallel
.ForEachAsync(
directory.EnumerateDirectories("*", SearchOption.TopDirectoryOnly),
async (dir, _) => await DeleteDiretoryAsync(dir).ConfigureAwait(false)
.ForEachAsync(directory.EnumerateDirectories("*", SearchOption.TopDirectoryOnly), async (dir, _) =>
await DeleteDiretoryAsync(dir).ConfigureAwait(false)
)
.ConfigureAwait(false);

Expand Down
17 changes: 8 additions & 9 deletions src/NetEvolve.ProjectBuilders/Models/Output/OutputFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,15 @@ public List<OutputRunResult> Results
{
if (_results is null)
{
_results =
Runs?.SelectMany(r =>
_results = Runs?.SelectMany(r =>
{
if (r.Results is null)
{
if (r.Results is null)
{
return [];
}
return r.Results;
})
.ToList()
return [];
}
return r.Results;
})
.ToList()
?? [];
}

Expand Down
6 changes: 2 additions & 4 deletions src/NetEvolve.ProjectBuilders/ProjectFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,8 @@ public async ValueTask<OutputFile> BuildAsync(string[]? args = null, Cancellatio
await PrepareNuGetPackagesAsync(cancellationToken).ConfigureAwait(false);

await Parallel
.ForEachAsync(
ObjectBuilders,
cancellationToken,
async (file, token) => await file.CreateAsync(token).ConfigureAwait(false)
.ForEachAsync(ObjectBuilders, cancellationToken, async (file, token) =>
await file.CreateAsync(token).ConfigureAwait(false)
)
.ConfigureAwait(false);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ public async Task BuildAsync_CSharpProject_Expected(CancellationToken cancellati

var result = await factory
.AddCSharpProject(projectBuilder => projectBuilder.WithTargetFramework(TargetFramework.Net8))
.AddGlobalJson(
Constants.RuntimeSdkDefault,
jsonBuilder => jsonBuilder.SetRollForward(RollForward.LatestMajor)
.AddGlobalJson(Constants.RuntimeSdkDefault, jsonBuilder =>
jsonBuilder.SetRollForward(RollForward.LatestMajor)
)
.BuildAsync(cancellationToken: cancellationToken);

Expand Down Expand Up @@ -56,9 +55,8 @@ public async Task BuildAsync_WithoutEnvironmentVariables_StillBuildsSuccessfully
// Act
var result = await factory
.AddCSharpProject(projectBuilder => projectBuilder.WithTargetFramework(TargetFramework.Net8))
.AddGlobalJson(
Constants.RuntimeSdkDefault,
jsonBuilder => jsonBuilder.SetRollForward(RollForward.LatestMajor)
.AddGlobalJson(Constants.RuntimeSdkDefault, jsonBuilder =>
jsonBuilder.SetRollForward(RollForward.LatestMajor)
)
.BuildAsync(cancellationToken: cancellationToken);

Expand All @@ -80,9 +78,8 @@ public async Task BuildAsync_VBProject_Expected(CancellationToken cancellationTo

var result = await factory
.AddVBProject(projectBuilder => projectBuilder.WithTargetFramework(TargetFramework.Net8))
.AddGlobalJson(
Constants.RuntimeSdkDefault,
jsonBuilder => jsonBuilder.SetRollForward(RollForward.LatestMajor)
.AddGlobalJson(Constants.RuntimeSdkDefault, jsonBuilder =>
jsonBuilder.SetRollForward(RollForward.LatestMajor)
)
.BuildAsync(cancellationToken: cancellationToken);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ public async Task BuildAsync_CSharpProject_Expected()

var result = await factory
.AddCSharpProject(projectBuilder => projectBuilder.WithTargetFramework(TargetFramework.Net8))
.AddGlobalJson(
Constants.RuntimeSdkDefault,
jsonBuilder => jsonBuilder.SetRollForward(RollForward.LatestMajor)
.AddGlobalJson(Constants.RuntimeSdkDefault, jsonBuilder =>
jsonBuilder.SetRollForward(RollForward.LatestMajor)
)
.BuildAsync(cancellationToken: TestContext.Current.CancellationToken);

Expand All @@ -32,9 +31,8 @@ public async Task BuildAsync_VBProject_Expected()

var result = await factory
.AddVBProject(projectBuilder => projectBuilder.WithTargetFramework(TargetFramework.Net8))
.AddGlobalJson(
Constants.RuntimeSdkDefault,
jsonBuilder => jsonBuilder.SetRollForward(RollForward.LatestMajor)
.AddGlobalJson(Constants.RuntimeSdkDefault, jsonBuilder =>
jsonBuilder.SetRollForward(RollForward.LatestMajor)
)
.BuildAsync(cancellationToken: TestContext.Current.CancellationToken);

Expand Down
Loading