The idea is to be able to offer “aesthetic consistency” across charms, without making any semantic/functional changes.
charmcraft format command would rewrite several files in the charms’ project, applying the needed changes. Of course this will be totally optional, and the user may not want to use this command at all (in other words, this will not happen automatically on
pack, for example)
So far we collected these actions on what such command would do:
metadata.yamlsections in a particular order; from metadata v2 reference:
charmcraft.yamlsections in a particular order:
parts, and here inside try to sort them by order of business (need to check if that is possible)
- in all those
.yamlfiles: one line gap between each main section and no gaps anywhere else
config.yamloptions and in
actions.yamlkeys and their
paramsitems: change names to be in kebab case (“foo-bar”)
Please comment below what other actions this command could have, thanks!!