Skip to content
Open
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
33 changes: 33 additions & 0 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,39 @@
)$
types: [yaml]

# this hook is autogenerated from a script
# to modify this hook, update `src/check_jsonschema/catalog.py`
# and run `just generate-hooks` or `tox run -e generate-hooks-config`
- id: check-datadog-continuous-testing
name: Validate Datadog Continuous Testing config
description: 'Validate Datadog Continuous Testing config against the schema provided by SchemaStore'
entry: check-jsonschema --builtin-schema vendor.datadog-continuous-testing
language: python
files: (^|.*/)datadog-ci\.(json|ya?ml)$
types_or: [json,yaml]

# this hook is autogenerated from a script
# to modify this hook, update `src/check_jsonschema/catalog.py`
# and run `just generate-hooks` or `tox run -e generate-hooks-config`
- id: check-datadog-service-definition
name: Validate Datadog Service Definition
description: 'Validate Datadog Service Definition against the schema provided by SchemaStore'
entry: check-jsonschema --builtin-schema vendor.datadog-service-definition
language: python
files: (^|.*/)service\.datadog\.(json|ya?ml)$
types_or: [json,yaml]

# this hook is autogenerated from a script
# to modify this hook, update `src/check_jsonschema/catalog.py`
# and run `just generate-hooks` or `tox run -e generate-hooks-config`
- id: check-datadog-software-catalog
name: Validate Datadog Software Catalog entity
description: 'Validate Datadog Software Catalog entity against the schema provided by SchemaStore'
entry: check-jsonschema --builtin-schema vendor.datadog-software-catalog
language: python
files: (^|.*/)entity\.datadog\.(json|ya?ml)$
types_or: [json,yaml]

# this hook is autogenerated from a script
# to modify this hook, update `src/check_jsonschema/catalog.py`
# and run `just generate-hooks` or `tox run -e generate-hooks-config`
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ CHANGELOG
Unreleased
----------

- Add Datadog schema hooks: ``check-datadog-continuous-testing``,
``check-datadog-service-definition``, and ``check-datadog-software-catalog``.
Thanks :user:`lannuttia`! (:issue:`702`, :pr:`701`)

.. vendor-insert-here

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor, but let's put this note down below this comment; the vendoring script uses the comment to insert the Update vendored schemas: ... entries.


- Add a dedicated ``check-github-workflows-require-timeout`` pre-commit hook for
Expand Down
42 changes: 42 additions & 0 deletions docs/precommit_usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,48 @@ Validate Docker Compose files against the schema provided by SchemaStore
- id: check-compose-spec


``check-datadog-continuous-testing``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Validate Datadog Continuous Testing config against the schema provided by SchemaStore

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

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.4
hooks:
- id: check-datadog-continuous-testing


``check-datadog-service-definition``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Validate Datadog Service Definition against the schema provided by SchemaStore

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

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.4
hooks:
- id: check-datadog-service-definition


``check-datadog-software-catalog``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Validate Datadog Software Catalog entity against the schema provided by SchemaStore

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

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.4
hooks:
- id: check-datadog-software-catalog


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

Expand Down
3 changes: 3 additions & 0 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ SchemaStore and other sources:
- ``vendor.cloudbuild``
- ``vendor.codecov``
- ``vendor.compose-spec``
- ``vendor.datadog-continuous-testing``
- ``vendor.datadog-service-definition``
- ``vendor.datadog-software-catalog``
- ``vendor.dependabot``
- ``vendor.drone-ci``
- ``vendor.github-actions``
Expand Down
Loading
Loading