From 6423baebd92e45c9be85157c443dff42e65d8d14 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Fri, 1 Sep 2023 00:00:00 +0000 Subject: 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 --- git_hooks/pre-commit | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 git_hooks/pre-commit (limited to 'git_hooks/pre-commit') 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 @@ +#!/bin/sh + +set -eu + +if ! cargo fmt -- --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 + +exit 0 \ No newline at end of file -- cgit v1.2.3