Skip to content

Commit

Permalink
Enforce formatting on helm chart json schema files (#15895)
Browse files Browse the repository at this point in the history
  • Loading branch information
jedcunningham authored May 17, 2021
1 parent fe0600c commit b2de542
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,6 @@ indent_size = 2

[*.{htm,html}]
indent_size = 2

[*.json]
indent_size = 4
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,14 @@ repos:
exclude: ^airflow/_vendor/
args:
- --remove
- id: pretty-format-json
args:
- --autofix
- --no-sort-keys
- --indent
- "4"
files: ^chart/values\.schema\.json$|^chart/values_schema\.schema\.json$
pass_filenames: true
- repo: https://github.com/asottile/pyupgrade
rev: v2.13.0
hooks:
Expand Down
4 changes: 2 additions & 2 deletions BREEZE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2265,8 +2265,8 @@ This is the current syntax for `./breeze <./breeze>`_:
incorrect-use-of-LoggingMixin insert-license isort json-schema language-matters
lint-dockerfile lint-openapi markdownlint mermaid mixed-line-ending mypy mypy-helm
no-providers-in-core-examples no-relative-imports pre-commit-descriptions
pre-commit-hook-names provide-create-sessions providers-init-file provider-yamls
pydevd pydocstyle pylint pylint-tests python-no-log-warn pyupgrade
pre-commit-hook-names pretty-format-json provide-create-sessions providers-init-file
provider-yamls pydevd pydocstyle pylint pylint-tests python-no-log-warn pyupgrade
restrict-start_date rst-backticks setup-order setup-extra-packages shellcheck
sort-in-the-wild sort-spelling-wordlist stylelint trailing-whitespace ui-lint
update-breeze-file update-extras update-local-yml-file update-setup-cfg-file
Expand Down
2 changes: 2 additions & 0 deletions STATIC_CODE_CHECKS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ require Breeze Docker images to be installed locally:
----------------------------------- ---------------------------------------------------------------- ------------
``pre-commit-hook-names`` Check that hook names are not overly long
----------------------------------- ---------------------------------------------------------------- ------------
``pretty-format-json`` Formats json files
----------------------------------- ---------------------------------------------------------------- ------------
``provide-create-sessions`` Make sure provide-session and create-session imports are OK
----------------------------------- ---------------------------------------------------------------- ------------
``providers-init-file`` Check that provider's __init__.py file is removed
Expand Down
1 change: 1 addition & 0 deletions breeze-complete
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ no-providers-in-core-examples
no-relative-imports
pre-commit-descriptions
pre-commit-hook-names
pretty-format-json
provide-create-sessions
providers-init-file
provider-yamls
Expand Down

0 comments on commit b2de542

Please sign in to comment.