-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add
husky
to enforce conventional commit message linter
- Loading branch information
Showing
5 changed files
with
1,548 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ | |
target | ||
out | ||
*.iml | ||
node_modules |
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,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx --no -- commitlint --edit ${1} |
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,30 @@ | ||
#!/bin/sh | ||
|
||
set -eu | ||
|
||
if ! cargo +nightly fmt --all -- --check | ||
then | ||
echo "There are some code style issues." | ||
echo "Run `cargo fmt` first." | ||
exit 1 | ||
fi | ||
|
||
if ! cargo clippy --all-targets -- -D warnings | ||
then | ||
echo "There are some clippy issues." | ||
exit 1 | ||
fi | ||
|
||
if ! cargo test | ||
then | ||
echo "There are some test issues." | ||
exit 1 | ||
fi | ||
|
||
if ! cargo test --features thread_safe | ||
then | ||
echo "There are some test issues (with `thread_safe` feature)." | ||
exit 1 | ||
fi | ||
|
||
exit 0 |
Oops, something went wrong.