# Run `pre-commit install` to setup the repo
repos:
-   repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v6.0.0
    hooks:
    -   id: check-yaml
    -   id: end-of-file-fixer
    -   id: trailing-whitespace
-   repo: local
    hooks:
    -   id: rust-linting
        name: Rust linting
        description: Run cargo fmt on files included in the commit. rustfmt should be installed before-hand.
        entry: cargo fmt --all --
        pass_filenames: true
        types: [file, rust]
        language: system
    -   id: rust-clippy
        name: Rust clippy
        description: Run cargo clippy on files included in the commit. clippy should be installed before-hand.
        entry: cargo clippy --all-targets --all-features -- -Dclippy::all
        # cargo clippy --all-targets --all-features --fix -- -Dclippy::all
        pass_filenames: false
        types: [file, rust]
        language: system
