Open sed-i opened 2 years ago
Hello! This would be format
, right?
In your idea this will improve the metadata.yaml
layout, without touching any semantic content, right? Any other files? We should define the reach of this format and gain consensus on what is a good idea to change and what is not. Maybe a forum post?
What do you think? Thanks!
Correct, the idea is to be able to offer "aesthetic consistency" across charms, without making any semantic/functional changes.
Similar to go fmt
, cargo fmt
, terraform fmt
, ...
If you generally agree on the premise then a post might be a good idea.
This is quite interesting. One possible extension here is suggesting style on interface names and config items (I.e. _ vs - as separators etc)
I went ahead and created a post in the forum to collect more changes. Once that stabilizes we could formalize this.
Regarding the command, I would go with format
, as we're trying to not use abbreviations. Also, I would add a --diff
option to it, to not write the files back, just output a diff for each file on stdout.
It could be handy if charmcraft had an
fmt
command to apply a set of opinionated formatting choices. For example: