Files
trailofbits-dropkit/.pre-commit-config.yaml
T
2026-01-29 21:53:58 -05:00

43 lines
1.1 KiB
YAML

# Pre-commit configuration
# Run with: prek run (or prek run --all-files)
default_language_version:
python: python3.11
repos:
# Ruff - official pre-commit hooks (faster than local)
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.14
hooks:
- id: ruff-check
args: [--fix]
- id: ruff-format
# prek builtin hooks - fast, no external deps
- repo: builtin
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
exclude: ^dropkit/templates/ # Jinja2 templates aren't valid YAML
- id: check-toml
- id: check-merge-conflict
- id: check-added-large-files
# ty type checking (no official pre-commit hook, use local)
- repo: local
hooks:
- id: ty-check
name: ty type check
entry: uv run ty check dropkit/
language: system
types: [python]
pass_filenames: false
# Shell script linting
- repo: https://github.com/koalaman/shellcheck-precommit
rev: v0.10.0
hooks:
- id: shellcheck
args: [--severity=error]