-
Notifications
You must be signed in to change notification settings - Fork 75
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
82 lines (82 loc) · 2.37 KB
/
.pre-commit-config.yaml
File metadata and controls
82 lines (82 loc) · 2.37 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
fail_fast: false
default_language_version:
python: python3
default_stages:
- pre-commit
- pre-push
minimum_pre_commit_version: 2.16.0
repos:
# all files
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: detect-private-key
- id: check-ast
- id: end-of-file-fixer
- id: mixed-line-ending
args: [--fix=lf]
- id: trailing-whitespace
- id: check-case-conflict
- repo: https://github.com/rbubley/mirrors-prettier
rev: v3.8.3
hooks:
- id: prettier
# package metadata
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.1
hooks:
- id: check-jsonschema
files: "scripts/src/ecosystem_scripts/schema.json"
args: ["--check-metaschema"]
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.1
hooks:
- id: check-jsonschema
files: "packages/.*/meta.yaml"
args: ["--schemafile", "scripts/src/ecosystem_scripts/schema.json"]
- repo: local
hooks:
- id: forbid-to-commit
name: Check files in `packages` directory
entry: |
Only `meta.yaml` and logo files are permitted in the packages directory
language: fail
files: "^packages/.*$"
exclude: "^packages/.*/(meta.yaml|logo\\..*)$"
# scripts
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.11
hooks:
- id: ruff-check
args: [--fix, --exit-non-zero-on-fix]
files: ^scripts/.*$
- id: ruff-format
files: ^scripts/.*$
- repo: https://github.com/tox-dev/pyproject-fmt
rev: v2.21.1
hooks:
- id: pyproject-fmt
- repo: https://github.com/camptocamp/jsonschema-gentypes
rev: "2.13.0"
hooks:
- id: jsonschema-gentypes
args:
- --json-schema=scripts/src/ecosystem_scripts/schema.json
- --python=scripts/src/ecosystem_scripts/schema.pyi
files: ^scripts/.*/schema.json$
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.20.1
hooks:
- id: mypy
args: [--config-file=scripts/pyproject.toml, scripts]
pass_filenames: false
additional_dependencies:
- httpx
- httpx-limiter
- httpx-retries
- types-jsonschema
- pillow
- pygithub
- types-PyYAML
- rich
files: ^scripts/.*$