forked from bobmatnyc/claude-mpm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
94 lines (86 loc) · 2.37 KB
/
.pre-commit-config.yaml
File metadata and controls
94 lines (86 loc) · 2.37 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
# Pre-commit hooks configuration for claude-mpm
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
# Standard pre-commit hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
exclude: ^(.*\.md|.*\.txt)$
- id: end-of-file-fixer
exclude: ^(.*\.md|.*\.txt)$
- id: check-yaml
args: ['--unsafe'] # Allow custom YAML tags
- id: check-json
- id: check-toml
- id: check-merge-conflict
- id: check-added-large-files
args: ['--maxkb=1000']
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- id: mixed-line-ending
args: ['--fix=lf']
# Ruff - replaces black, isort, flake8, pyupgrade (10-200x faster)
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.4 # Use latest version
hooks:
# Run the linter
- id: ruff
args: [--fix]
# Run the formatter
- id: ruff-format
# Type checking with mypy
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
hooks:
- id: mypy
additional_dependencies: [types-PyYAML, types-requests]
args: ['--config-file=mypy.ini']
exclude: ^(venv/|\.venv/|env/|\.env/|build/|dist/|\.git/|tests/.*\.py|scripts/.*\.py)
# Security scanning with bandit
- repo: https://github.com/pycqa/bandit
rev: 1.7.5
hooks:
- id: bandit
args: ['-r', '-f', 'json']
exclude: ^(venv/|\.venv/|env/|\.env/|build/|dist/|\.git/|tests/.*\.py)
# Documentation linting
- repo: https://github.com/pycqa/doc8
rev: v1.1.1
hooks:
- id: doc8
args: ['--max-line-length=88']
files: \.rst$
# Commitizen for conventional commits
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.13.0
hooks:
- id: commitizen
stages: [commit-msg]
# Configuration for specific file types
exclude: |
(?x)^(
venv/.*|
\.venv/.*|
env/.*|
\.env/.*|
build/.*|
dist/.*|
\.git/.*|
__pycache__/.*|
.*\.pyc|
.*\.pyo|
.*\.egg-info/.*|
\.coverage|
\.pytest_cache/.*|
\.mypy_cache/.*|
node_modules/.*|
\.DS_Store|
\.vscode/.*|
\.idea/.*
)$
# Global settings
default_stages: [pre-commit]
fail_fast: false