fail_fast: true
repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v6.0.0
    hooks:
      - id: end-of-file-fixer
      - id: trailing-whitespace
        exclude: ^.github/

  - repo: https://github.com/pycqa/isort
    rev: 8.0.0
    hooks:
      - id: isort
        args: ["--profile", "black"]
        exclude: ^.github/

  - repo: https://github.com/psf/black
    rev: 26.1.0
    hooks:
      - id: black
        exclude: ^.github/

  - repo: https://github.com/cpp-linter/cpp-linter-hooks
    rev: v1.1.13
    hooks:
      - id: clang-format
        types_or: [c++, c]
        args: [--style=file, --version=21]
      - id: clang-tidy
        types_or: [c++, c]
        exclude: ^(web/main\.cc)$
        args:
          [--checks=.clang-tidy, --version=21, "-fix", "--warnings-as-errors=*"]
