infra! Added pre-commit module and configuration

This commit is contained in:
2025-12-18 07:37:50 +01:00
parent 9a726b52bc
commit f88f512cb0
3 changed files with 215 additions and 6 deletions

29
.pre-commit-config.yaml Normal file
View File

@@ -0,0 +1,29 @@
repos:
- 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
- id: check-toml
- id: check-added-large-files
- repo: https://github.com/gitleaks/gitleaks
rev: v8.30.0
hooks:
- id: gitleaks
name: Gitleaks
- repo: local
hooks:
- id: ruff
name: Ruff
entry: bash -c 'cd brain && poetry run ruff check --fix .'
language: system
types: [python]
- id: system-pytest
name: Pytest
entry: bash -c 'cd brain && poetry run pytest -n auto --dist=loadscope'
language: system
always_run: true