Files
letta-server/.pre-commit-config.yaml
Kian Jones f5931f3a2f feat: add trufflehog to precommit (#4252)
* add trufflehog

* add to readme

* use their docs
2025-08-27 15:33:33 -07:00

36 lines
1.3 KiB
YAML

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
exclude: 'docs/.*|tests/data/.*|configs/.*|helm/.*'
- id: end-of-file-fixer
exclude: 'docs/.*|tests/data/.*|letta/server/static_files/.*|.*/.*\.(scss|css|html)'
- id: trailing-whitespace
exclude: 'docs/.*|tests/data/.*|letta/server/static_files/.*'
- repo: local
hooks:
- id: trufflehog
name: TruffleHog
entry: bash -c 'trufflehog git file://. --since-commit HEAD --results=verified,unknown --fail'
language: system
stages: ["pre-commit", "pre-push"]
- id: autoflake
name: autoflake
entry: bash -c '[ -d "apps/core" ] && cd apps/core; uv run autoflake --remove-all-unused-imports --remove-unused-variables --in-place --recursive --ignore-init-module-imports .'
language: system
types: [python]
- id: isort
name: isort
entry: bash -c '[ -d "apps/core" ] && cd apps/core; uv run isort --profile black .'
language: system
types: [python]
exclude: ^docs/
- id: black
name: black
entry: bash -c '[ -d "apps/core" ] && cd apps/core; uv run black --line-length 140 --target-version py310 --target-version py311 .'
language: system
types: [python]
exclude: ^docs/