Introduce a Validate cli command
Is your feature request related to a problem? Please describe. I want to be able to validate my changelog file as part of ci pipeline.
Describe the solution you'd like Introduce a new cli command Validate which has the following options:
-h, --help help for validate
-f, --file string Specify which file we are interested in
-c, --config string Specify which config file we are interested in
If validation problems exist an error code should be returned enabling the CI pipeline to be failed.
Describe alternatives you've considered Using the batch command with dry run but that wouldn't necessarily show all failures and results in unnecessary processing.
Additional context This validation should be implicitly be run as part of the batch command.
Your alternative is currently what I'm doing haha. I think it is a fair point, would need to figure out the full spec, validate could mean many things like config file validation or fragments.
Agree, had not thought about, what about having seperate arguments for files/fragments and config like the update I have made above?
Agree, had not thought about, what about having seperate arguments for files/fragments and config like the update I have made above?
I would say I don't think a validate all really would do any more then validating the config and all fragments. If anything it does kinda miss a few things like your replacements config could be wrong but that would only be executed in a merge, or your env var usage that would only trigger if defined. Really it would be a bare bones, the config yaml and/or fragments are at least valid files at first glance. And a batch --dry-run + merge --dry-run would be slightly more complete. But even then not fully validated.
I could see a world where a validate command would be nice, and it by default with validate the config, all unchanged fragments and maybe things like replacements for merges. And optionally separate config files or specific fragments. But I don't really see how its any better then a batch and merge dry run. Maybe it's at least more clear that way.