-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Establish style guide #40
Comments
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.The text was updated successfully, but these errors were encountered: