forked from awslabs/mcp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
65 lines (62 loc) · 2.08 KB
/
.pre-commit-config.yaml
File metadata and controls
65 lines (62 loc) · 2.08 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-illegal-windows-names
- id: check-json
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-toml
- id: check-xml
# Full check against all YAML files excluding mkdocs.yml
- id: check-yaml
- id: end-of-file-fixer
- id: debug-statements
- id: destroyed-symlinks
- id: detect-private-key
- id: detect-aws-credentials
args: [ --allow-missing-credentials ]
- id: forbid-submodules
- id: pretty-format-json
exclude: ^docusaurus\/package-lock.json$
args: [ --autofix ]
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.4
hooks:
- id: ruff
args: [ --fix ]
- id: ruff-format
- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
- id: detect-secrets
args: ['--baseline', '.secrets.baseline']
- repo: local
hooks:
- id: check-license-header
name: check license header
pass_filenames: false
language: system
entry: npm
args: [
'exec', '--',
'github:viperproject/check-license-header#v1', 'check', '--config', './.github/workflows/check-license-header.json']
- id: pyright
name: pyright
pass_filenames: true
language: system
entry: bash -c 'for x in "$@"; do (cd `dirname $x`; pwd; uv run --frozen --all-extras --dev pyright --stats;); done;' --
stages: [pre-push]
files: (src|samples)\/.*\/pyproject.toml
- id: pytest
name: pytest
pass_filenames: true
language: system
entry: bash -c 'for x in "$@"; do (cd `dirname $x`; pwd; uv run --frozen pytest --cov --cov-branch --cov-report=term-missing;); done;' --
stages: [pre-push]
files: src\/.*\/pyproject.toml