repos:
  - repo: local
    hooks:
      - id: cargo-fmt
        name: cargo fmt
        entry: bash -c 'cargo fmt -- "$@" && git add "$@"' --
        language: system
        types: [rust]

      - id: cargo-clippy
        name: cargo clippy
        entry: cargo clippy -- -D warnings
        language: system
        types: [rust]
        pass_filenames: false

      - id: shellcheck
        name: shellcheck
        entry: shellcheck
        language: system
        types: [shell]
