-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
76 lines (73 loc) · 2.2 KB
/
.pre-commit-config.yaml
File metadata and controls
76 lines (73 loc) · 2.2 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
---
# Run with prek (drop-in pre-commit replacement): prek run --all-files
# Install: uv tool install prek && prek install && prek install --hook-type pre-push
repos:
# File hygiene
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: mixed-line-ending
args: [--fix=lf]
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-yaml
- id: check-json
- id: check-toml
- id: check-added-large-files
args: [--maxkb=256]
- id: fix-byte-order-marker
# Markdown formatting
- repo: https://github.com/executablebooks/mdformat
rev: 1.0.0
hooks:
- id: mdformat
args: [--wrap, '100', --number]
exclude: ^docs/(options\.md|other/tools\.md)$
additional_dependencies:
- mdformat-mkdocs[recommended]
# Local hooks
- repo: local
hooks:
# Pre-commit hooks (fast, auto-fix)
- id: ruff-check
name: Ruff linting
entry: uv run ruff check --fix
language: system
types: [python]
stages: [pre-commit]
- id: ruff-format
name: Ruff formatting
entry: uv run ruff format
language: system
types: [python]
stages: [pre-commit]
# Pre-push hooks (thorough quality gates)
- id: zuban
name: Type checking
entry: uv run zuban check iscc_sdk/
language: system
types: [python]
stages: [pre-push]
pass_filenames: false
verbose: true
- id: security
name: Security scan (Ruff S rules)
entry: uv run ruff check --select S --force-exclude iscc_sdk/
language: system
types: [python]
stages: [pre-push]
pass_filenames: false
- id: complexity
name: Complexity check (Ruff C901)
entry: uv run ruff check --select C901 --force-exclude iscc_sdk/
language: system
types: [python]
stages: [pre-push]
pass_filenames: false
- id: pytest
name: Tests with coverage
entry: uv run pytest --cov=iscc_sdk --cov-fail-under=100 --timeout=120
language: system
types: [python]
stages: [pre-push]
pass_filenames: false