-
Notifications
You must be signed in to change notification settings - Fork 546
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
95 lines (88 loc) · 2.71 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
95 lines (88 loc) · 2.71 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
83
84
85
86
87
88
89
90
91
92
93
94
95
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.12
# Each project is linted under its own config; the global hook runs once per project.
hooks:
- id: ruff
name: api-lint
files: ^api/
args: [--config, api/pyproject.toml, --config, "src = ['api']", --fix]
- id: ruff-format
name: api-format
files: ^api/
args: [--config, api/pyproject.toml, --config, "src = ['api']"]
- id: ruff
name: mcp-lint
files: ^mcp/
args:
[--config, mcp/pyproject.toml, --config, "src = ['mcp/src']", --fix]
- id: ruff-format
name: mcp-format
files: ^mcp/
args: [--config, mcp/pyproject.toml, --config, "src = ['mcp/src']"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-yaml
- id: check-json
- id: check-toml
- repo: local
hooks:
- id: prettier
name: prettier
language: node
entry: prettier
additional_dependencies:
- prettier@3.4.2
args:
- --check
types: [javascript, jsx, ts, tsx, markdown, mdx, html, css, json, yaml]
- id: generate-docs
name: generate-docs
language: system
entry: make -C api generate-docs
pass_filenames: false
files: ^api/
types_or: [python, toml]
- id: api-typecheck
name: api-typecheck
language: system
entry: uv run --directory api mypy .
require_serial: true
pass_filenames: false
files: ^api/
types: [python]
stages: [pre-push]
- id: mcp-typecheck
name: mcp-typecheck
language: system
entry: uv run --directory mcp mypy .
require_serial: true
pass_filenames: false
files: ^mcp/
types: [python]
stages: [pre-push]
- repo: https://github.com/Flagsmith/flagsmith-common
rev: v3.9.0
hooks:
- id: flagsmith-lint-tests
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.11.18 # Ensure this matches the version in api/pyproject.toml
hooks:
- id: uv-lock
name: api-lockcheck
args: ["--project", "api", "--check"]
- id: uv-lock
name: mcp-lockcheck
args: ["--project", "mcp", "--check"]
- repo: https://github.com/renovatebot/pre-commit-hooks
rev: 43.205.2
hooks:
- id: renovate-config-validator
name: renovate-config-validator
stages: [pre-push]
default_install_hook_types: [pre-commit, pre-push]
default_stages: [pre-commit]
ci:
skip: [generate-docs, api-typecheck, mcp-typecheck, renovate-config-validator]
autoupdate_commit_msg: "ci: pre-commit autoupdate"