From 59d2cef0826080f9bf7bd60332c15ec614153834 Mon Sep 17 00:00:00 2001 From: koplas Date: Thu, 23 Jan 2025 11:53:57 +0100 Subject: [PATCH 1/2] Fix typos --- cmd/csaf_validator/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/csaf_validator/main.go b/cmd/csaf_validator/main.go index 346180b..3250388 100644 --- a/cmd/csaf_validator/main.go +++ b/cmd/csaf_validator/main.go @@ -107,7 +107,7 @@ func run(opts *options, files []string) error { log.Printf("error: loading %q as JSON failed: %v\n", file, err) continue } - // Validate agsinst Schema. + // Validate against Schema. validationErrs, err := csaf.ValidateCSAF(doc) if err != nil { log.Printf("error: validating %q against schema failed: %v\n", @@ -124,7 +124,7 @@ func run(opts *options, files []string) error { fmt.Printf("%q passes the schema validation.\n", file) } - // Check filename agains ID + // Check filename against ID if err := util.IDMatchesFilename(eval, doc, filepath.Base(file)); err != nil { log.Printf("%s: %s.\n", file, err) continue From 6e8c2ecc059090865dd6bc48bc4ff0371757c8ee Mon Sep 17 00:00:00 2001 From: koplas Date: Thu, 23 Jan 2025 12:22:11 +0100 Subject: [PATCH 2/2] Check remote validator even if file validation fails This makes it consistent with the handling of schema validation. --- cmd/csaf_validator/main.go | 1 - 1 file changed, 1 deletion(-) diff --git a/cmd/csaf_validator/main.go b/cmd/csaf_validator/main.go index 3250388..b3a0855 100644 --- a/cmd/csaf_validator/main.go +++ b/cmd/csaf_validator/main.go @@ -127,7 +127,6 @@ func run(opts *options, files []string) error { // Check filename against ID if err := util.IDMatchesFilename(eval, doc, filepath.Base(file)); err != nil { log.Printf("%s: %s.\n", file, err) - continue } // Validate against remote validator.