lemmy/.cargo-husky/hooks/pre-commit
Nutomic 21304e6751
Create a custom pre-commit hook, generates config/defaults.hjson (#1857)
* Create a custom pre-commit hook, generates config/defaults.hjson (fixes #1836)

* invalid defaults file

* Revert "invalid defaults file"

This reverts commit 76d2c303e2.
2021-10-21 12:57:09 -04:00

10 lines
304 B
Bash
Executable file

#!/bin/bash
set -e
cargo +nightly fmt -- --check
cargo +nightly clippy --workspace --tests --all-targets --all-features -- \
-D warnings -D deprecated -D clippy::perf -D clippy::complexity -D clippy::dbg_macro
cargo run -- --print-config-docs > config/defaults.hjson
git add config/defaults.hjson