-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
68 lines (68 loc) · 2.19 KB
/
.pre-commit-config.yaml
File metadata and controls
68 lines (68 loc) · 2.19 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
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: v5.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/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
# mcp server metadata
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.33.0
hooks:
- id: check-jsonschema
name: Check schema.json and mcp_schema.json for meta schema compliance
files: "(schema.json|mcp_schema.json)"
args: ["--check-metaschema"]
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.33.0
hooks:
- id: check-jsonschema
name: Check meta.yaml files for schema compliance
files: "servers/.*/meta.yaml"
args: ["--schemafile", "schema.json"]
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.33.0
hooks:
- id: check-jsonschema
name: Check mcp.json files for schema compliance
files: "servers/.*/mcp.json"
args: ["--schemafile", "mcp_schema.json"]
- repo: local
hooks:
- id: forbid-to-commit
name: Check files in `servers` directory
language: fail
entry: |
Only files named `meta.yaml`, `mcp.json`, and `.mcpskip` are permitted in the servers directory
files: "^servers/.*"
exclude: "^servers/.*/(meta.yaml|mcp.json|\\.mcpskip)$"
- id: validate-mcp-server-names
name: Validate mcp server names match meta identifiers
language: python
entry: python src/schema_validation/validate_mcp_json_schema.py
additional_dependencies: [rich, PyYAML]
files: "servers/.*/mcp.json"
verbose: true
# template repo registry
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.8
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format