Closed bedge closed 7 years ago
At the moment, cfn-flip is still a tool for converting from JSON to YAML or vice versa and so doesn't support comments at all.
If going from JSON to YAML, there will be no comments to start with as JSON doesn't support them. If going from YAML to JSON, there will be no comment in the output as JSON doesn't support them.
In the future, I intend to add an option to validate and clean-up without performing the translation from JSON <> YAML or vice versa. I'm not sure yet whether to make that feature a part of cfn-flip or to start a new, related project.
Hi @stilvoid , is the option to validate and cleanup without converting from JSON <> YAML in the roadmap? Would be great to do the cleanup in the YAML CloudFormation templates, preserving the comments.
I have no plans to do it any time soon as I'm not aware of a YAML library that will support everything required.
Have you seen cfn-lint - that project is very likely more useful for template validation purposes.
hi @stilvoid, now that we have the -n
option, can we revive the idea of cleaning up YAML while preserving the comments?
I would use the -c cleanup arg as a pre-commit hook to ensure minimal variation in git commits, but it strips comments. Could these be preserved?