prek: add pre-commit checker for cargo-fmt and cargo-clippy
This commit is contained in:
19
prek.toml
Normal file
19
prek.toml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
[[repos]]
|
||||||
|
repo = "local"
|
||||||
|
hooks = [
|
||||||
|
{
|
||||||
|
id = "cargo-fmt",
|
||||||
|
name = "cargo-fmt",
|
||||||
|
language = "system",
|
||||||
|
entry = "cargo fmt --",
|
||||||
|
types = ["rust"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id = "cargo-clippy",
|
||||||
|
name = "cargo-clippy",
|
||||||
|
language = "system",
|
||||||
|
entry = "cargo clippy -- -Dwarnings",
|
||||||
|
types = ["rust"],
|
||||||
|
pass_filenames = false,
|
||||||
|
},
|
||||||
|
]
|
||||||
Reference in New Issue
Block a user