Skip to content

Commit 5734d04

Browse files
authored
Merge pull request #444 from jrdnbradford/add-circle-ci-hook
Add CircleCI `pre-commit` hook
2 parents feb8116 + 5c62276 commit 5734d04

File tree

6 files changed

+1550
-0
lines changed

6 files changed

+1550
-0
lines changed

.pre-commit-hooks.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,16 @@
6868
)$
6969
types_or: [json,yaml]
7070

71+
# this hook is autogenerated from a script
72+
# to modify this hook, update `src/check_jsonschema/catalog.py`
73+
# and run `make generate-hooks` or `tox run -e generate-hooks-config`
74+
- id: check-circle-ci
75+
name: Validate CircleCI config
76+
description: 'Validate CircleCI config against the schema provided by SchemaStore'
77+
entry: check-jsonschema --builtin-schema vendor.circle-ci
78+
language: python
79+
files: ^\.circleci/config\.(yml|yaml)$
80+
7181
# this hook is autogenerated from a script
7282
# to modify this hook, update `src/check_jsonschema/catalog.py`
7383
# and run `make generate-hooks` or `tox run -e generate-hooks-config`

docs/precommit_usage.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,20 @@ Validate Buildkite Pipelines against the schema provided by Buildkite
9999
- id: check-buildkite
100100
101101
102+
``check-circle-ci``
103+
~~~~~~~~~~~~~~~~~~~
104+
105+
Validate CircleCI config against the schema provided by SchemaStore
106+
107+
.. code-block:: yaml
108+
:caption: example config
109+
110+
- repo: https://github.com/python-jsonschema/check-jsonschema
111+
rev: 0.28.5
112+
hooks:
113+
- id: check-circle-ci
114+
115+
102116
``check-cloudbuild``
103117
~~~~~~~~~~~~~~~~~~~~
104118

docs/usage.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ SchemaStore and other sources:
9090
- ``vendor.bamboo-spec``
9191
- ``vendor.bitbucket-pipelines``
9292
- ``vendor.buildkite``
93+
- ``vendor.circle-ci``
9394
- ``vendor.cloudbuild``
9495
- ``vendor.dependabot``
9596
- ``vendor.drone-ci``

0 commit comments

Comments
 (0)