Added the parse option to yamltool because it gives much better error messages than yuamllint and yq.

This commit is contained in:
2025-11-30 17:11:11 +01:00
parent c21adb9a35
commit 2bb8d68edd
3 changed files with 25 additions and 1 deletions
+10
View File
@@ -57,6 +57,16 @@ Shows the additions and modifications in <file2> compared to <file1>`,
}
cmd.AddCommand(merge)
parse := &cobra.Command{
Use: "parse [file1] ... [fileN]",
Short: "Parse yaml files.",
Long: `Parse yaml files, usually gives better error messages than yamllint or yq`,
RunE: func(cmd *cobra.Command, args []string) error {
return parseFiles(cmd, args)
},
}
cmd.AddCommand(parse)
diff.PersistentFlags().IntVarP(&VERBOSITY, "array-output-level",
"v", 3, `Array output level: ,
0: no output, only exit status,