repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: end-of-file-fixer
exclude: '.*\.snap$'
- id: check-yaml
- id: mixed-line-ending
- id: trailing-whitespace
exclude: '.*\.(rs|snap)$'
- repo: https://github.com/crate-ci/typos
rev: v1.37.2
hooks:
- id: typos
pass_filenames: false
- repo: https://github.com/r0x0d/pre-commit-rust
rev: v1.0.1
hooks:
- id: fmt
- repo: https://github.com/r0x0d/pre-commit-rust
rev: v1.0.1
hooks:
- id: clippy
args: ["--all-targets", "--", "-D", "warnings"]
- repo: https://github.com/tcort/markdown-link-check
rev: v3.14.1
hooks:
- id: markdown-link-check
name: markdown-link-check
types: [markdown]
- repo: local
hooks:
- id: no-dbg
name: no-dbg
description: We shouldn't merge code with `dbg!` in
language: pygrep
types: ["rust"]
entry: "dbg!"
- id: check-output-system
name: check-output-system
description: Commands using --internal must use crate::output::* functions
language: script
entry: scripts/check-output-system.sh
pass_filenames: false
files: "^src/commands/(worktree|merge)\\.rs$"
ci:
skip: [fmt, markdown-link-check]
autoupdate_commit_msg: "chore: pre-commit autoupdate"