chore: add pre-commit hook recipes #32
Loading…
Reference in a new issue
No description provided.
Delete branch "chore/pre-commit-hooks"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds the governance opt-in pre-commit hook recipes (
[group: 'hooks']) fromgovernance/PRE_COMMIT.mdto this repo'sjustfile, using Variant B (ad-hocdocker run, nocompose.dev.yml) against therust-builder-glibcimage so a localjust pre-commitruns the exact CI toolchain.install-hookswrites a.git/hooks/pre-commitstub that execsjust pre-commit(run once per fresh clone, bypass any single commit withgit commit --no-verify).pre-commitmirrors.forgejo/workflows/check.ymlbyte-for-byte in order: cargo fmt --check, cargo clippy --all-targets --features server -- -D warnings, cargo check --features server, cargo check --target wasm32-unknown-unknown, then cargo test --features server --bin vervain-app, each as its owndocker runwith the shareddev-vervain-apps-cargo-targetanddev-vervain-apps-cargo-registrynamed volumes for incremental cache.This is a mixed-language repo (Rust/Dioxus + bun/Tailwind), so the recipe runs the Tailwind build FIRST:
assets/tailwind-built.cssis gitignored/generated and is embedded byasset!()insrc/main.rs:70, so the cargo steps fail without it. The rust-builder image has no bun, so the CSS is built on the HOST exactly as the repo builds it (bun install --frozen-lockfilethenbun run tailwindcss --input assets/tailwind.css --output assets/tailwind-built.css --minify, matching thebuild-cssrecipe and the check.yml Build Tailwind CSS step) before the cargo steps run in Docker.Defines
dev_image := "ghcr.io/niceguyit/rust-builder-glibc:v1.0.1-rust1.94-trixie"near the top of thejustfile. Opt-in dev tooling only; no behavior change to CI or the app. Validated withjust --list(exit 0, shows the[hooks]group). No YouTrack issue per the request.🤖 Generated with Claude Code