-
Notifications
You must be signed in to change notification settings - Fork 2
/
.pre-commit-config.yaml
53 lines (53 loc) · 1.38 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.8
hooks:
- id: ruff
# These files are codegen'd and non-compliant :'(
exclude: |
(?x)(
^apiv2/.*|
^schema/.*/metadata_models.py|
^schema/.*/ingestion_config_models.py
)
args:
- --fix
- --config
- ingestion_tools/pyproject.toml
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.8
hooks:
- id: ruff
args:
- --fix
- --config
- apiv2/pyproject.toml
files: '^apiv2/.*'
- repo: https://github.com/mpalmer/action-validator
# requires installing `npm install -g @action-validator/core @action-validator/cli --save-dev`
rev: v0.6.0
hooks:
- id: action-validator
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-toml
- id: check-yaml
exclude: ingestion_tools/dataset_configs/template.yaml
- id: check-json
exclude: "launch.json"
- id: check-merge-conflict
- id: end-of-file-fixer
exclude: |
(?x)(
^.release-please-manifest.json|
^release-please-config.json
)
- id: trailing-whitespace
- repo: local
hooks:
- id: dataset-config-validation
name: dataset-config-validation
entry: bash -c "cd schema/ && make validate-configs"
language: system
files: '^(ingestion_tools/dataset_configs/|schema/.*\.(py|yaml|json|Makefile))'