We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7123c3b commit e95cee0Copy full SHA for e95cee0
cmd/cdi/cmd/validate.go
@@ -24,6 +24,7 @@ import (
24
"github.com/spf13/cobra"
25
26
"tags.cncf.io/container-device-interface/pkg/cdi"
27
+ "tags.cncf.io/container-device-interface/specs-go"
28
)
29
30
// validateCmd is our CDI command for validating CDI Spec files in the cache.
@@ -49,6 +50,15 @@ were reported by the cache.`,
49
50
fmt.Printf(" %2d: %v\n", idx, strings.TrimSpace(err.Error()))
51
}
52
53
+
54
+ for _, v := range cache.ListVendors() {
55
+ for _, s := range cache.GetVendorSpecs(v) {
56
+ if err := specs.ValidateVersion(s.Spec); err != nil {
57
+ fmt.Printf("Spec file %s failed version validation: %v\n", s.GetPath(), err)
58
+ }
59
60
61
62
os.Exit(1)
63
},
64
0 commit comments