.pre-commit-config.yaml•1.54 kB
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
name: Check for trailing whitespaces (auto-fixes)
- id: end-of-file-fixer
name: Check for a blank line at the end of scripts (auto-fixes)
exclude: '\.Rd'
- id: check-yaml
- id: check-added-large-files
name: Check for files larger than 5 MB
args: [ "--maxkb=5120" ]
- id: check-merge-conflict
- id: check-toml
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.1
hooks:
- id: ruff
args: [--fix]
exclude: ^\.venv/
- id: ruff-format
exclude: ^\.venv/
- repo: https://github.com/PyCQA/bandit
rev: 1.8.5
hooks:
- id: bandit
args: [ "-c", "pyproject.toml", "-ll", "-r", "./parliament_mcp" ]
additional_dependencies: [ "bandit[toml]" ]
- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
- id: detect-secrets
exclude: uv.lock
- repo: local
hooks:
- id: detect-ip
name: Detect IP addresses
entry: '^(?!0\.0\.0\.0$)(?!127\.0\.0\.1$)\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}'
language: pygrep
exclude: '^static/|\.lock'
files: .
- repo: local
hooks:
- id: detect-aws-account
name: Detect AWS account numbers
language: pygrep
entry: ':\d{12}:'