# Generated by dev-configs

default_install_hook_types:
  - pre-commit
  - commit-msg

repos:
  - repo: local
    hooks:
      - id: clippy
        name: clippy (lint .rs files)
        entry: cargo clippy -- -D warnings
        language: system
        pass_filenames: false
        stages:
          - pre-commit
  - repo: local
    hooks:
      - id: needs-prefix
        name: commit message needs to have a prefix
        language: pygrep
        entry: '^(chore|ci|style|test|feat|fix|build|docs|refactor|perf)!?(\([a-z]+\))?: (?![A-Z])(?![a-z]+(ed|ing)\s).*$'
        args:
          - '--multiline'
          - '--negate'
        stages:
          - commit-msg
  - repo: local
    hooks:
      - id: rustfmt
        name: rustfmt (format .rs files)
        entry: rustfmt --edition 2024
        language: system
        types: [rust]
        stages:
          - pre-commit
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v6.0.0
    hooks:
      - id: trailing-whitespace
      - id: end-of-file-fixer
