exclude: '\.svg$'
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-added-large-files
        # Allow the vendored model-viewer bundle (see src/app/src/renderer/vendor/README.md),
        # which is necessarily larger than 500 KB.
        exclude: ^src/app/src/renderer/vendor/model-viewer\.min\.js$

  - repo: https://github.com/psf/black
    rev: 26.1.0
    hooks:
      - id: black
        language_version: python3
  - repo: https://github.com/python-jsonschema/check-jsonschema
    rev: 0.37.4
    hooks:
      - id: check-jsonschema
        files: .*\.json$
        exclude: ^(\.vscode/launch\.json|\.devcontainer/devcontainer\.json)$
        args: ["--schemafile", "schemas/any.json"]
      - id: check-github-actions
      - id: check-github-workflows

  - repo: local
    hooks:
      - id: comment-slop
        name: comment slop (repeated explanations, oversized blocks)
        entry: python tools/check_comment_slop.py
        language: python
        pass_filenames: false
        require_serial: true
        types_or: [c, c++, python]
