forked from rysweet/azlin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
48 lines (45 loc) · 1.57 KB
/
.pre-commit-config.yaml
File metadata and controls
48 lines (45 loc) · 1.57 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
repos:
# Basic file hygiene
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
args: ['--unsafe'] # Allow Python tags in YAML (needed for mkdocs.yml emoji config)
- id: check-added-large-files
args: ['--maxkb=1000']
- id: check-merge-conflict
- id: detect-private-key
exclude: ^(tests/.*|docs/TEST_STRATEGY\.md|docs/AUTH_ARCHITECTURE_DESIGN\.md|docs/testing/test_strategy\.md)$
# Python formatting and linting
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.1
hooks:
- id: ruff
args: [--fix]
exclude: ^\.claude/
- id: ruff-format
exclude: ^\.claude/
# Type checking - Phase 2: STRICT mode enabled (src/ only, excluding tests)
- repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.406
hooks:
- id: pyright
files: ^src/
exclude: (^\.claude/|^tests/|/tests/)
additional_dependencies:
- anthropic>=0.40.0
- click>=8.1.0
- pyyaml>=6.0.0
- rich>=13.7.0
- tomlkit>=0.12.0
# SSH Key Operations Audit - Ensure append-only behavior (Issue #419)
- repo: local
hooks:
- id: audit-key-operations
name: Audit SSH key operations (append-only)
entry: python3 scripts/audit_key_operations.py
language: system
files: \.(py|sh|bash)$
exclude: (^\.claude/|^tests/|^scripts/|^src/azlin/cli\.py$|^src/azlin/modules/nfs_mount_manager\.py$)