Skip to content

Commit b056809

Browse files
committed
Add pre-commit config
1 parent d4e89a8 commit b056809

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

.pre-commit-config.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
repos:
2+
- repo: local
3+
hooks:
4+
- id: rust-linting
5+
name: Rust linting
6+
description: Run cargo fmt on files included in the commit. rustfmt should be installed before-hand.
7+
entry: cargo fmt --all --
8+
pass_filenames: true
9+
types: [file, rust]
10+
language: system
11+
- id: rust-clippy
12+
name: Rust clippy
13+
description: Run cargo clippy on files included in the commit. clippy should be installed before-hand.
14+
entry: cargo clippy --all-targets --all-features -- -Dclippy::all
15+
pass_filenames: false
16+
types: [file, rust]
17+
language: system

0 commit comments

Comments
 (0)