ProcessOutputForImageValidation processes an output.Output using the same pipeline as the validate image command. This ensures consistent processing for both validate image and validate vsa (fallback) commands. Returns the processed Component which contains violations, warnings, successes processed
( out *output.Output, err error, comp app.SnapshotComponent, showSuccesses bool, outputFormats []string, )
| 197 | // Returns the processed Component which contains violations, warnings, successes |
| 198 | // processed with the same logic (filtering, sorting, etc.) as the validate image command. |
| 199 | func ProcessOutputForImageValidation( |
| 200 | out *output.Output, |
| 201 | err error, |
| 202 | comp app.SnapshotComponent, |
| 203 | showSuccesses bool, |
| 204 | outputFormats []string, |
| 205 | ) applicationsnapshot.Component { |
| 206 | // Use the same processing pipeline as validate image command |
| 207 | result := PopulateResultFromOutput(out, err, comp, showSuccesses, outputFormats) |
| 208 | return result.Component |
| 209 | } |