Closed corvus-ch closed 3 years ago
In a discussion with @simu we figured that there is already a mess with naming of exported things in libraries:
I suggest to follow the lead of Jsonnet and take camelCase as the standard for exported functions and variables.
Consider to also use https://editorconfig.org/. While we can check for this in CI/CD, having an editor config file results in a better developer experience.
Possible ideas: https://github.com/databricks/jsonnet-style-guide
Closed by #88.
Require all jsonnet code to be compliant with
jsonnetfmt
using the default options. For CI/CD pipelines, the commandjsonnetfmt --test **/*.jsonnet
can be used, while autoformatting can be done usingjsonnetfmt -i **/*.jsonnet
.jsonnetfmt
is documented at https://jsonnet.org/learning/tools.html.For YAML files, we should use
yamllint
For CI/CD pipelines, the commandyamllint -f parsable --no-warnings **/*.yml
can be used. For checking before commiting,yamllint **/*.yml
will do the trick.Rule wise, we might opt to make
line-length
a warning instead an error and or increase the character count from 80 to something like 120. Subject to be discussed.