nio-rust: Add a pre-commit config.
This commit is contained in:
parent
8d58938b41
commit
0b98440f54
1 changed files with 29 additions and 0 deletions
29
.pre-commit-config.yaml
Normal file
29
.pre-commit-config.yaml
Normal file
|
@ -0,0 +1,29 @@
|
|||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v2.2.3
|
||||
hooks:
|
||||
- id: check-yaml
|
||||
- id: end-of-file-fixer
|
||||
- id: trailing-whitespace
|
||||
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: fmt
|
||||
name: fmt
|
||||
language: system
|
||||
types: [file, rust]
|
||||
entry: cargo fmt -- --check
|
||||
|
||||
- id: clippy
|
||||
name: clippy
|
||||
language: system
|
||||
types: [file, rust]
|
||||
entry: cargo clippy --all-targets --all
|
||||
pass_filenames: false
|
||||
|
||||
- id: test
|
||||
name: test
|
||||
language: system
|
||||
files: '\.rs$'
|
||||
entry: cargo test --lib
|
||||
pass_filenames: false
|
Loading…
Reference in a new issue