repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v4.5.0
    hooks:
      - id: trailing-whitespace
      - id: end-of-file-fixer
      - id: check-yaml
      - id: check-added-large-files
      - id: check-merge-conflict

  - repo: https://github.com/doublify/pre-commit-rust
    rev: v1.0
    hooks:
      - id: fmt
        args: ['--all', '--', '--check']
      - id: cargo-check
      - id: clippy
        args: ['--all-targets', '--all-features', '--', '-D', 'warnings']

  - repo: local
    hooks:
      - id: cargo-test
        name: cargo test
        entry: cargo test --all-features
        language: system
        pass_filenames: false
        always_run: true
