Skip to content

Code clean up: Refactor logic for validation and error handling before operations #314

@raquelsa

Description

@raquelsa

We have a lot of code duplication for manifest validation, operation execution and logging

This applies to CLI, vsix and msbuild task. We duplicate a lot of code following the pattern:
StopWatch.Start();
await LibrariesValidator.GetManifestErrorsAsync()
if (!validationResults.All(r => r.Success))
{
StopWatch.Stop();
LogErrors();
LogTelemetry();
}
else
{
await ExecuteOperationAsync();
StopWatch.Stop();
LogOperationSummary();
LogTelemetry();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions