CircleCI-Public / config-preview-sdk

Preview SDK for orb authors
85 stars 29 forks source link

Use snake or kebab case consistently #89

Closed matfax closed 6 years ago

matfax commented 6 years ago

orb-tools use kebab case for naming, while previously snake case was the standard for the yaml configs. Are there any thoughts from CircleCI on this?

ndintenfass commented 6 years ago

In general, our YAML uses snake case for historic reasons and because that's generally more common among many the languages/frameworks our users interact with (and seems to be more popular in other YAML config DSLs). Many of our initial orbs use kebab because that's more natural to some of the folks building them out. In general, we are not opinionated about this for orb authoring and consider it a matter of style. While not intentional, I do find that kebab can help visually differentiate between the core YAML syntax in our configuration from the imported orb elements in some cases. Curious: do you find this difference disconcerting, or are you just looking for guidance on how to name your orbs?

ndintenfass commented 6 years ago

(I'm going to close this for now, but feel free to comment)

matfax commented 6 years ago

@ndintenfass Thanks for letting me know. In general, I prefer kebab, it has a better appearance. However, if you use two styles in one file, it can be confusing. It opens a window for errors that are purely related to a mixup of _ and -. But your argument is also comprehensible to distinguish core syntax from dynamic references.

In my orbs, I used snake case for the beginning. A general guidance, however, would be appreciated, maybe in the docs.