repos:
  - repo: https://github.com/psf/black
    rev: 25.9.0
    hooks:
      - id: black
        args: ["--config=pyproject.toml"]
  - repo: https://github.com/PyCQA/isort
    rev: 5.13.2
    hooks:
      - id: isort
        args: ["--filter-files", "--settings-path=pyproject.toml"]
  - repo: https://github.com/PyCQA/pydocstyle
    rev: 6.3.0
    hooks:
      - id: pydocstyle
        args: ["--config=pyproject.toml"]
        files: ^src/tnfr/
  - repo: local
    hooks:
      - id: check-bandit-format
        name: Check for invalid bandit -f sarif usage
        entry: bash -c 'if grep -r "bandit.*-f sarif" .github/workflows/ scripts/ --exclude=lint-workflows.yml 2>/dev/null; then echo "ERROR - bandit does not support SARIF format. Use -f json instead."; exit 1; fi'
        language: system
        pass_filenames: false
        files: ^(\.github/workflows/|scripts/|tools/).*\.(yml|yaml|sh|py)$
