Skip to content

Commit f7e8d84

Browse files
committed
feat(pre-commit): add Codecov config schema and pre-commit hook
1 parent dba36bf commit f7e8d84

File tree

10 files changed

+731
-0
lines changed

10 files changed

+731
-0
lines changed

.pre-commit-hooks.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,20 @@
8989
files: ^cloudbuild\.(yml|yaml|json)$
9090
types_or: [json,yaml]
9191

92+
# this hook is autogenerated from a script
93+
# to modify this hook, update `src/check_jsonschema/catalog.py`
94+
# and run `make generate-hooks` or `tox run -e generate-hooks-config`
95+
- id: check-codecov
96+
name: Validate Codecov config
97+
description: 'Validate Codecov config against the schema provided by SchemaStore'
98+
entry: check-jsonschema --builtin-schema vendor.codecov
99+
language: python
100+
files: >
101+
(?x)^(
102+
^(\.github|dev)?\.?codecov.ya?ml$
103+
)$
104+
types: [yaml]
105+
92106
# this hook is autogenerated from a script
93107
# to modify this hook, update `src/check_jsonschema/catalog.py`
94108
# and run `make generate-hooks` or `tox run -e generate-hooks-config`

CHANGELOG.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Unreleased
1111
.. vendor-insert-here
1212
1313
- Add GitHub issue form schema and pre-commit hook (:issue:`588`).
14+
- Add Codecov config schema and pre-commit hook.
1415

1516
0.33.3
1617
------

docs/precommit_usage.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,20 @@ Validate Google Cloud Build config against the schema provided by SchemaStore
127127
- id: check-cloudbuild
128128
129129
130+
``check-codecov``
131+
~~~~~~~~~~~~~~~~~
132+
133+
Validate Codecov config against the schema provided by SchemaStore
134+
135+
.. code-block:: yaml
136+
:caption: example config
137+
138+
- repo: https://github.com/python-jsonschema/check-jsonschema
139+
rev: 0.33.3
140+
hooks:
141+
- id: check-codecov
142+
143+
130144
``check-compose-spec``
131145
~~~~~~~~~~~~~~~~~~~~~~
132146

docs/usage.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ SchemaStore and other sources:
9292
- ``vendor.buildkite``
9393
- ``vendor.circle-ci``
9494
- ``vendor.cloudbuild``
95+
- ``vendor.codecov``
9596
- ``vendor.compose-spec``
9697
- ``vendor.dependabot``
9798
- ``vendor.drone-ci``

0 commit comments

Comments
 (0)