-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4e5e38b
commit 9dc6738
Showing
6 changed files
with
37 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
"$(git rev-parse --git-dir)/hooks/pre-commit-cargo-fmt" | ||
fmt=$? | ||
"$(git rev-parse --git-dir)/hooks/pre-commit-typos" | ||
typos=$? | ||
if [[ $fmt -ne 0 ]] || [[ $typos -ne 0 ]];then | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
cargo fmt -- --check | ||
result=$? | ||
|
||
if [[ ${result} -ne 0 ]] ; then | ||
cat <<\EOF | ||
There are some code style issues, run `cargo fmt && git add .` first. | ||
EOF | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
typos | ||
result=$? | ||
|
||
if [[ ${result} -ne 0 ]] ; then | ||
cat <<\EOF | ||
There are some typo issues, run `typos --write-changes && git add .` first. | ||
EOF | ||
exit 1 | ||
fi |