paper-survey-agent / .pre-commit-config.yaml
Daryna Vasylashko
feat: add centralized settings
236a30f
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
# default_language_version:
# python: python3.11
repos:
# Security - Detect hardcoded secrets
- repo: https://github.com/gitleaks/gitleaks
rev: v8.18.2
hooks:
- id: gitleaks
name: 🔒 Detect hardcoded secrets
# Git & Filesystem checks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
name: 🌳 Block large file commits
- id: check-merge-conflict
name: 🌳 Detect merge conflict markers
- id: check-toml
name: 📁 Validate TOML files
- id: check-yaml
name: 📁 Validate YAML files
args:
- --unsafe
- id: end-of-file-fixer
name: 📁 Fix end of files
exclude_types: [text, jupyter]
- id: trailing-whitespace
name: 📁 Trim trailing whitespace
# Python formatting and linting
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.1
hooks:
- id: ruff
name: 🐍 Lint with Ruff
args:
- --fix
exclude_types: [jupyter]
- id: ruff-format
name: 🐍 Format with Ruff
exclude_types: [jupyter]
# Validate pyproject.toml
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.23
hooks:
- id: validate-pyproject
name: 🐍 Validate pyproject.toml
ci:
autofix_commit_msg: 🎨 [pre-commit.ci] Auto format from pre-commit.com hooks
autoupdate_commit_msg: [pre-commit.ci] pre-commit autoupdate