Closed paulvollmer closed 4 years ago
How much complexity will it add? If it's not an intrusive change, I think we're open to it.
At first we need to check the file extension and adding a switch/case
for it. if it is a .yaml
or .yml
we need to call the yaml.Unmarshal
to set the checkup.Checkup
variable.
I think it's not a big thing to implement. this need to go to the following function: https://github.com/sourcegraph/checkup/blob/652614992c205ab79901efb26d2bb73cfc25b8fb/cmd/root.go#L74-L87
For the encoding need only to add some yaml keys. These keys you still defined for json. for example... https://github.com/sourcegraph/checkup/blob/01dd92f7cffa45fd2381d0b15a991b347923cf22/checkup.go#L21-L48
i can start implementing this feature...
I'm closing this issue because it isn't feasible. Checkup relies on json.RawMessage to pass parts of the configuration without schema to it's plugins (storage, check and notifier). Yaml decoding doesn't have the concept of a rawMessage, or a standard library parser for it.
Upstream issue: https://github.com/go-yaml/yaml/issues/13
if the config can be written in yaml, it's possible to write comments or comment out some parts of the configuration.
do you accept a pull request for that?