repos:
  - repo: meta
    hooks:
      - id: check-hooks-apply
      - id: check-useless-excludes

  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v3.2.0
    hooks:
      - id: check-ast
      - id: check-case-conflict
      - id: check-docstring-first
      - id: check-json
      - id: check-merge-conflict
      - id: check-toml
      - id: check-vcs-permalinks
      - id: check-yaml
      - id: debug-statements
      - id: end-of-file-fixer
        exclude: cspell.json
      - id: mixed-line-ending
      - id: trailing-whitespace

  - repo: https://github.com/psf/black
    rev: 20.8b1
    hooks:
      - id: black

  - repo: https://github.com/kynan/nbstripout
    rev: 0.3.8
    hooks:
      - id: nbstripout
        files: ".ipynb"

  - repo: https://github.com/prettier/prettier
    rev: 2.1.1
    hooks:
      - id: prettier
        language_version: 12.18.2 # prettier does not specify node correcly

  - repo: local
    hooks:
      - id: clang-format
        name: clang-format
        entry: clang-format
        language: system
        types:
          - c++

      - id: rstcheck
        name: rstcheck
        entry: rstcheck
        language: system
        files: \.(inc|rst)$
