-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
89 lines (87 loc) · 2.62 KB
/
.pre-commit-config.yaml
File metadata and controls
89 lines (87 loc) · 2.62 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
fail_fast: true
repos:
- repo: local
hooks:
- id: format
name: ruff-formatter
language: python
types: [python]
entry: bash -c 'cd src/dashboard && ruff format --config=pyproject.toml --force-exclude .'
files: src/dashboard/
- id: ruff
name: ruff
language: python
types: [python]
entry: bash -c 'cd src/dashboard && ruff check --config=pyproject.toml --force-exclude --fix .'
files: src/dashboard/
- id: mypy
name: mypy
language: python
types: [python]
entry: mypy --config-file=src/dashboard/pyproject.toml
files: src/dashboard/
- id: import-linter
name: import-linter
language: python
types: [python]
entry: bash -c 'cd src/dashboard/apigateway && lint-imports --config=../pyproject.toml'
files: src/dashboard/
- repo: local
hooks:
- id: black
name: black
language: python
types: [python]
entry: black --config=src/esb/pyproject.toml
files: src/esb/
- id: ruff
name: ruff
language: python
types: [python]
entry: bash -c 'cd src/esb && ruff check --config=pyproject.toml --force-exclude --fix .'
files: ^src/esb/
- id: mypy
name: mypy
language: python
types: [python]
entry: mypy --config-file=src/esb/pyproject.toml
files: src/esb/
- repo: local
hooks:
- id: Name check
name: Check sensitive info
verbose: true
language: system
require_serial: true
entry: bash -c "if [[ -d pre_commit_hooks ]]; then pre_commit_hooks/rtx.sh $@; fi"
- id: IP check
name: Check sensitive info
verbose: true
language: system
require_serial: true
entry: bash -c "if [[ -d pre_commit_hooks ]]; then pre_commit_hooks/ip.sh $@; fi"
- repo: local
hooks:
- id: fmt
name: fmt
entry: bash -c 'cd src/mcp-proxy && make fmt'
language: system
files: src/mcp-proxy/
pass_filenames: false
- id: lint
name: lint
entry: bash -c 'cd src/mcp-proxy && make lint'
language: system
files: src/mcp-proxy/
pass_filenames: false
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- id: insert-license
exclude: "^src/mcp-proxy/docs/docs.go"
files: ^src/mcp-proxy/.*\.go$
args:
- --license-filepath
- src/mcp-proxy/license_header.txt # defaults to: LICENSE.txt
- --comment-style
- ""