Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,21 @@
files: ^cloudbuild\.(yml|yaml|json)$
types_or: [json,yaml]

# this hook is autogenerated from a script
# to modify this hook, update `src/check_jsonschema/catalog.py`
# and run `make generate-hooks` or `tox run -e generate-hooks-config`
- id: check-compose-spec
name: Validate Docker Compose files
description: 'Validate Docker Compose files against the schema provided by SchemaStore'
entry: check-jsonschema --builtin-schema vendor.compose-spec
language: python
files: >
(?x)^(
([^/]*/)*docker-compose(\.[\.a-zA-Z0-9_-]*)*\.(yml|yaml)|
([^/]*/)*compose(\.[\.a-zA-Z0-9_-]*)*\.(yml|yaml)
)$
types: [yaml]

# this hook is autogenerated from a script
# to modify this hook, update `src/check_jsonschema/catalog.py`
# and run `make generate-hooks` or `tox run -e generate-hooks-config`
Expand Down
14 changes: 14 additions & 0 deletions docs/precommit_usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,20 @@ Validate Google Cloud Build config against the schema provided by SchemaStore
- id: check-cloudbuild


``check-compose-spec``
~~~~~~~~~~~~~~~~~~~~~~

Validate Docker Compose files against the schema provided by SchemaStore

.. code-block:: yaml
:caption: example config

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.31.0
hooks:
- id: check-compose-spec


``check-dependabot``
~~~~~~~~~~~~~~~~~~~~

Expand Down
1 change: 1 addition & 0 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ SchemaStore and other sources:
- ``vendor.buildkite``
- ``vendor.circle-ci``
- ``vendor.cloudbuild``
- ``vendor.compose-spec``
- ``vendor.dependabot``
- ``vendor.drone-ci``
- ``vendor.github-actions``
Expand Down
Loading
Loading