---
ci:
  skip:
    # pre-commit.ci doesn't have cargo installed inside its runners so these
    # jobs fail with "Executable `cargo` not found".
    # https://github.com/pre-commit-ci/issues/issues/89
    - cargo-check
    - fmt

repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v6.0.0
    hooks:
      - id: check-builtin-literals
      - id: check-merge-conflict
      - id: check-toml
      - id: check-yaml
      - id: debug-statements
      - id: end-of-file-fixer
      - id: mixed-line-ending
      - id: no-commit-to-branch
        args: ["--branch", "main"]
      - id: trailing-whitespace
  - repo: https://github.com/editorconfig-checker/editorconfig-checker.python
    rev: 3.6.1
    hooks:
      - id: editorconfig-checker
        alias: ec
  - repo: https://github.com/doublify/pre-commit-rust
    rev: v1.0
    hooks:
      - id: cargo-check
      - id: fmt
