Skip to content

Commit 439b85a

Browse files
committed
Updated .pre-commit-config.yaml , so it only validates when a change happens
1 parent 242ab39 commit 439b85a

File tree

1 file changed

+20
-10
lines changed

1 file changed

+20
-10
lines changed

.pre-commit-config.yaml

+20-10
Original file line numberDiff line numberDiff line change
@@ -15,32 +15,42 @@ repos:
1515
hooks:
1616
- id: jsonschema_dir_validate
1717
name: Check 2.0.x
18-
language: python
19-
always_run: true
18+
types:
19+
- json
20+
files: ^json-schemas/2.0.x/.*\.json$
21+
require_serial: true
2022
pass_filenames: false
2123
args: [ "json-schemas/2.0.x" ]
2224
- id: json_validation
2325
name: Validate 2.0.x prototype data
24-
language: python
25-
always_run: true
26+
types:
27+
- json
28+
files: ^prototype-data/2.0.x/.*\.json$
29+
require_serial: true
2630
pass_filenames: false
2731
args: [ "-c", "json-schemas/2.0.x", "prototype-data/2.0.x" ]
2832
- id: jsonschema_dir_validate
2933
name: Check 1.0.x
30-
language: python
31-
always_run: true
34+
types:
35+
- json
36+
files: ^json-schemas/1.0.x/.*\.json$
37+
require_serial: true
3238
pass_filenames: false
3339
args: [ "json-schemas/1.0.x" ]
3440
- id: json_validation
3541
name: Validate 1.0.x prototype data
36-
language: python
37-
always_run: true
42+
types:
43+
- json
44+
files: ^prototype-data/1.0.x/.*\.json$
45+
require_serial: true
3846
pass_filenames: false
3947
args: [ "-c", "json-schemas/1.0.x", "prototype-data/1.0.x" ]
4048
- id: jsonschema_dir_validate
4149
name: Check 0.4.x
42-
language: python
43-
always_run: true
50+
types:
51+
- json
52+
files: ^json-schemas/0.4.x/.*\.json$
53+
require_serial: true
4454
pass_filenames: false
4555
args: [ "json-schemas/0.4.x" ]
4656
- repo: https://github.com/jmfernandez/pre-commit_mirrors-actionlint.git

0 commit comments

Comments
 (0)