mirror of https://codeberg.org/topola/topola.git
chore(pre-commit): move rustfmt hook to `.pre-commit-config.yaml`
This commit is contained in:
parent
d0058ef5fd
commit
04fda44d4b
|
|
@ -1,11 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
diff=$(cargo fmt -- --check)
|
||||
result=$?
|
||||
|
||||
if [ ${result} -ne 0 ]; then
|
||||
echo "There are some code formatting issues, run `cargo fmt` first."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
repos:
|
||||
- repo: https://github.com/doublify/pre-commit-rust
|
||||
rev: v1.0
|
||||
hooks:
|
||||
- id: fmt
|
||||
Loading…
Reference in New Issue