diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2023-09-01 00:00:00 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2023-09-13 09:24:49 +0000 |
| commit | 6423baebd92e45c9be85157c443dff42e65d8d14 (patch) | |
| tree | 6548edfd80d0cd9d1267378ebe816ec95e394137 /git_hooks/pre-commit | |
| parent | 5c5feaa732363e32e2a980a887fa42b4394b1a5e (diff) | |
refactor: rebuild app skeleton
Create skeleton for a complete rebuild of the prototype as a production
ready product.
Includes design patterns for:
- dependency injection
- unit testing with dependency mocking
- integration testing
- error handling
- config storage
BREAKING-CHANGE: ground-up redesign with incompatible protocol standards
Diffstat (limited to 'git_hooks/pre-commit')
| -rwxr-xr-x | git_hooks/pre-commit | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/git_hooks/pre-commit b/git_hooks/pre-commit new file mode 100755 index 0000000..63b191d --- /dev/null +++ b/git_hooks/pre-commit | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | set -eu | ||
| 4 | |||
| 5 | if ! cargo fmt -- --check | ||
| 6 | then | ||
| 7 | echo "There are some code style issues." | ||
| 8 | echo "Run cargo fmt first." | ||
| 9 | exit 1 | ||
| 10 | fi | ||
| 11 | |||
| 12 | if ! cargo clippy --all-targets -- -D warnings | ||
| 13 | then | ||
| 14 | echo "There are some clippy issues." | ||
| 15 | exit 1 | ||
| 16 | fi | ||
| 17 | |||
| 18 | if ! cargo test | ||
| 19 | then | ||
| 20 | echo "There are some test issues." | ||
| 21 | exit 1 | ||
| 22 | fi | ||
| 23 | |||
| 24 | exit 0 \ No newline at end of file | ||