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
6 changes: 2 additions & 4 deletions src/tooling/docs-assembler/Cli/NavigationCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ private void AssignOutputLogger()
public async Task<int> Validate(Cancel ctx = default)
{
AssignOutputLogger();
await using var collector = new ConsoleDiagnosticsCollector(logger, githubActionsService);
await using var collector = new ConsoleDiagnosticsCollector(logger, githubActionsService).StartAsync(ctx);
var assembleContext = new AssembleContext("dev", collector, new FileSystem(), new FileSystem(), null, null);
_ = collector.StartAsync(ctx);

// this validates all path prefixes are unique, early exit if duplicates are detected
if (!GlobalNavigationFile.ValidatePathPrefixes(assembleContext) || assembleContext.Collector.Errors > 0)
Expand Down Expand Up @@ -64,8 +63,7 @@ public async Task<int> ValidateLocalLinkReference([Argument] string? file = null
AssignOutputLogger();
file ??= ".artifacts/docs/html/links.json";

await using var collector = new ConsoleDiagnosticsCollector(logger, githubActionsService);
_ = collector.StartAsync(ctx);
await using var collector = new ConsoleDiagnosticsCollector(logger, githubActionsService).StartAsync(ctx);

var assembleContext = new AssembleContext("dev", collector, new FileSystem(), new FileSystem(), null, null);

Expand Down
6 changes: 2 additions & 4 deletions src/tooling/docs-assembler/Cli/RepositoryCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public async Task<int> CloneAll(
var githubEnvironmentInput = githubActionsService.GetInput("environment");
environment ??= !string.IsNullOrEmpty(githubEnvironmentInput) ? githubEnvironmentInput : "dev";

await using var collector = new ConsoleDiagnosticsCollector(logger, githubActionsService);
await using var collector = new ConsoleDiagnosticsCollector(logger, githubActionsService).StartAsync(ctx);

var assembleContext = new AssembleContext(environment, collector, new FileSystem(), new FileSystem(), null, null);
var cloner = new AssemblerRepositorySourcer(logger, assembleContext);
Expand Down Expand Up @@ -85,9 +85,7 @@ public async Task<int> BuildAll(
await using var collector = new ConsoleDiagnosticsCollector(logger, githubActionsService)
{
NoHints = true
};

_ = collector.StartAsync(ctx);
}.StartAsync(ctx);

var assembleContext = new AssembleContext(environment, collector, new FileSystem(), new FileSystem(), null, null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,7 @@ public async Task UriResolving()
{
Assert.SkipUnless(HasCheckouts(), $"Requires local checkout folder: {CheckoutDirectory.FullName}");

await using var collector = new DiagnosticsCollector([]);
_ = collector.StartAsync(TestContext.Current.CancellationToken);
await using var collector = new DiagnosticsCollector([]).StartAsync(TestContext.Current.CancellationToken);

var fs = new FileSystem();
var assembleContext = new AssembleContext("prod", collector, fs, fs, null, null);
Expand Down
Loading