diff --git a/.envrc b/.envrc index 3550a30f..e19e6221 100644 --- a/.envrc +++ b/.envrc @@ -1 +1,2 @@ +git config core.hooksPath .github/hooks use flake diff --git a/.github/hooks/pre-commit b/.github/hooks/pre-commit new file mode 100755 index 00000000..4cd86cf6 --- /dev/null +++ b/.github/hooks/pre-commit @@ -0,0 +1,3 @@ +#!/bin/sh + +just pre-commit diff --git a/Justfile b/Justfile index ac78d3e9..8c496680 100644 --- a/Justfile +++ b/Justfile @@ -1,5 +1,6 @@ -_default: - just --list --unsorted +[private] +default: + @ just --list --unsorted lint: cargo fmt --all @@ -12,4 +13,8 @@ test: | egrep -v '^$' build: - cargo build --release \ No newline at end of file + cargo build --release + +[private] +pre-commit: + cargo fmt --check \ No newline at end of file