diff --git a/.git-hooks/pre-commit b/.git-hooks/pre-commit new file mode 100755 index 0000000..a9d5658 --- /dev/null +++ b/.git-hooks/pre-commit @@ -0,0 +1,12 @@ +#!/bin/sh +set -o nounset # Fail on use of unset variable. +set -o errexit # Exit on command failure. +set -o pipefail # Exit on failure of any command in a pipeline. +set -o errtrace # Trap errors in functions and subshells. +set -o noglob # Disable filename expansion (globbing), + # since it could otherwise happen during + # path splitting. +shopt -s inherit_errexit # Inherit the errexit option status in subshells. + +cargo clippy --all-targets --all -- -D warnings +cargo fmt -- --check diff --git a/README.md b/README.md new file mode 100644 index 0000000..6c34bbc --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +# automation_rs +Custom home automation solution with google-home intergration + +## Development +Make sure to setup git hooks by running +```sh +git config --local core.hooksPath .git-hooks/ +```