feat: add pre-commit hook to repo (#94)

This commit is contained in:
yse
2024-04-25 10:56:46 +02:00
committed by GitHub
parent 1d3ed4b00c
commit 2eb0faead3
2 changed files with 14 additions and 0 deletions

9
.githooks/pre-commit Executable file
View File

@@ -0,0 +1,9 @@
#!/bin/bash
set -e
# Cargo syntax checks
dirs=("lib" "cli")
for dir in ${dirs[@]}; do
(cd $dir; exec cargo fmt; exec cargo clippy -- -D warnings)
done

5
DEVELOPMENT.md Normal file
View File

@@ -0,0 +1,5 @@
## Setup
To configure automatic code formatting and syntax checking for this repository, you can run the following command once:
```bash
git config --local core.hooksPath .githooks/
```