39 lines
1.1 KiB
YAML
39 lines
1.1 KiB
YAML
repos:
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v4.4.0
|
|
hooks:
|
|
- id: trailing-whitespace
|
|
- id: end-of-file-fixer
|
|
- id: check-yaml
|
|
- id: check-toml
|
|
- id: check-json
|
|
- id: check-merge-conflict
|
|
- id: check-case-conflict
|
|
- id: check-added-large-files
|
|
args: ['--maxkb=1000']
|
|
- id: detect-private-key
|
|
|
|
- repo: https://github.com/doublify/pre-commit-rust
|
|
rev: v1.0
|
|
hooks:
|
|
- id: fmt
|
|
args: ['--verbose', '--']
|
|
- id: cargo-check
|
|
args: ['--all-features']
|
|
- id: clippy
|
|
args: ['--all-features', '--all-targets', '--', '-D', 'warnings']
|
|
|
|
- repo: local
|
|
hooks:
|
|
- id: cargo-test
|
|
name: cargo test
|
|
entry: cargo test --all-features
|
|
language: system
|
|
types: [rust]
|
|
pass_filenames: false
|
|
- id: cargo-audit
|
|
name: cargo audit
|
|
entry: bash -c 'if command -v cargo-audit &> /dev/null; then cargo audit; else echo "cargo-audit not installed, skipping security audit"; fi'
|
|
language: system
|
|
types: [rust]
|
|
pass_filenames: false |