repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: local
hooks:
- id: cargo-fmt
name: cargo fmt
entry: bash -c 'cargo fmt --all'
language: system
pass_filenames: false
stages: [pre-commit]
- id: cargo-clippy
name: cargo clippy (sources only)
entry: bash -c 'cargo clippy --all-features -- -D warnings'
language: system
pass_filenames: false
stages: [pre-commit]
- id: actionlint
name: Lint GitHub Actions workflows
entry: actionlint
language: system
files: ^\.github/workflows/.*\.ya?ml$
stages: [pre-commit]