defenseunicorns / go-oscal

Repository for the generation of OSCAL data types
Apache License 2.0
15 stars 1 forks source link

fix(validation)!: #266 validation.ValidationCommand no longer returns error if validation was run #267

Closed mike-winberry closed 3 months ago

mike-winberry commented 3 months ago

Description

Reworked the ValidationCommand and v.Validate() return values to make it more clear when a non validation error has been thrown by changing the above methods to handle errors and validation errors separately using the ValidationResponse and ValidationResult types.

Related Issue

266

Type of change

Checklist before merging

mike-winberry commented 3 months ago

Resolves the identified issue. Currently prints both to stdout and the outputfile if specified - maybe that is intentional and otherwise doesn't block merge.

intentional for now, not opposed to removing the log when the output file is set, I just always like my failures in the logs even if I am outputting.