-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update ValidateAsync & throw exception if SBOM not found (#425)
* update ValidateAsync to return errors & throw exception if SBOM not found * small fix to return type * address some PR feedback * restructure SBOMValidationResult * small fix to constructor * add new constructor * remove ConfigSanitizer --------- Co-authored-by: Sebastian Gomez <69322674+sebasgomez238@users.noreply.github.com>
- Loading branch information
1 parent
ba02542
commit 8add17b
Showing
6 changed files
with
46 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 0 additions & 22 deletions
22
src/Microsoft.Sbom.Contracts/Contracts/SBOMValidationFailure.cs
This file was deleted.
Oops, something went wrong.
15 changes: 13 additions & 2 deletions
15
src/Microsoft.Sbom.Contracts/Contracts/SBOMValidationResult.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,22 @@ | ||
// Copyright (c) Microsoft. All rights reserved. | ||
// Copyright (c) Microsoft. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
namespace Microsoft.Sbom.Contracts; | ||
|
||
using System.Collections.Generic; | ||
|
||
/// <summary> | ||
/// Represents the result of a SBOM validation action. | ||
/// </summary> | ||
public abstract class SBOMValidationResult | ||
public class SBOMValidationResult | ||
{ | ||
public bool IsSuccess { get; private set; } | ||
|
||
public IList<EntityError> Errors { get; private set; } | ||
|
||
public SBOMValidationResult(bool isSuccess, IList<EntityError> errors) | ||
{ | ||
this.IsSuccess = isSuccess; | ||
this.Errors = errors; | ||
} | ||
} |
11 changes: 0 additions & 11 deletions
11
src/Microsoft.Sbom.Contracts/Contracts/SBOMValidationSuccess.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters