-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
52 lines (47 loc) · 1.49 KB
/
.pre-commit-config.yaml
File metadata and controls
52 lines (47 loc) · 1.49 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
# Pre-commit hooks for SQuADDS
# Install with: uv run pre-commit install
# Run manually: uv run pre-commit run --all-files
repos:
# Ruff - Fast Python linter and formatter
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.0
hooks:
# Run the linter (fix safe issues, warn on others)
- id: ruff
args: [--fix, --unsafe-fixes, --exit-zero]
# Run the formatter
- id: ruff-format
# General file fixes
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
exclude: ^(tutorials/|docs/_static/)
- id: end-of-file-fixer
exclude: ^(tutorials/|docs/_static/)
- id: check-yaml
args: [--unsafe]
- id: check-toml
- id: check-added-large-files
args: ['--maxkb=1000']
- id: check-merge-conflict
- id: debug-statements
# Check for common security issues (informational only - does not block commits)
- repo: https://github.com/PyCQA/bandit
rev: 1.8.3
hooks:
- id: bandit
args: [-c, pyproject.toml, -ll, --exit-zero] # Only report high severity, don't fail
additional_dependencies: ["bandit[toml]"]
exclude: ^(tests/|docs/|tutorials/)
# Configuration for CI
ci:
autofix_commit_msg: |
style: auto-fix by pre-commit hooks
[pre-commit.ci]
autofix_prs: true
autoupdate_branch: ''
autoupdate_commit_msg: 'chore: update pre-commit hooks'
autoupdate_schedule: weekly
skip: []
submodules: false