-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
61 lines (56 loc) · 1.99 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
61 lines (56 loc) · 1.99 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
# prek pre-commit configuration (https://prek.j178.dev/).
# Install the git hook with `prek install`, or run on demand with `prek run --all-files`.
repos:
- repo: local
hooks:
- id: uv-lockfile-check
name: uv lockfile check
entry: "pants test hooks:uv-lockfile-check"
language: system
files: '^(pyproject\.toml|uv\.lock)$'
pass_filenames: false
groups: [dependencies-checks]
priority: 0
- id: lint
name: lint
entry: pants --changed-since=HEAD lint fmt
language: system
pass_filenames: false
groups: [linting]
priority: 2
- id: mypy
name: mypy
entry: pants --changed-since=HEAD check
language: system
files: '^.*\.py$'
pass_filenames: false
verbose: true
groups: [typechecks]
priority: 3
- id: actionlint
name: actionlint
description: "Lint GitHub Actions workflow files (syntax, expressions, shellcheck on run blocks)."
entry: hooks/actionlint.sh
language: script
files: '^\.github/workflows/.*\.ya?ml$'
pass_filenames: true
groups: [linting]
priority: 3
- id: openapi-json-spec-check
name: openapi-json-spec-check
description: "Ensure the beetkeeper openapi.json is up to date."
entry: "pants run build_scripts:openapi-json-exporter -- --check"
# Whole package, not just `api/`: core DTOs (e.g. `core.import_jobs.ImportCandidate`) surface in
# API response models, so their fields land in the exported schema too.
files: '^src/python/beetkeeper/.*$'
language: system
pass_filenames: false
priority: 3
- id: docs-build-check
name: docs build check
description: "Ensure the MkDocs build without error"
entry: "pants run docs:mkdocs-pex -- build --strict"
files: '^docs/.*$'
language: system
pass_filenames: false
priority: 20