Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
Git Pre-Commit Hooks
Merged lorenz opened 1 year ago

Use cachix/git-hooks.nix which wraps pre-commit to manage Git pre-commit hooks.

Currently this exposes checks like cargo check, cargo clippy, shellcheck and formatting of Nix files by alejandra as a hook. This only works for Nix users and must be initialized by calling nix develop.

The resulting .pre-commit-config.yaml is currently ignored, but once we settle on a set of Git hooks that we like, we could add that file so that non-Nix users may use the same hooks via pre-commit directly.

Hooks are automatically executed by git commit, unless the --no-verify flag is passed (escape hatch) and are also part of nix flake check.

The second commit in the patch contains fixes to calm shellcheck.

lorenz opened with revision ab46c5df on base 77386b0f +161 -49 1 year ago

Use cachix/git-hooks.nix which wraps pre-commit to manage Git pre-commit hooks.

Currently this exposes checks like cargo check, cargo clippy, shellcheck and formatting of Nix files by alejandra as a hook. This only works for Nix users and must be initialized by calling nix develop.

The resulting .pre-commit-config.yaml is currently ignored, but once we settle on a set of Git hooks that we like, we could add that file so that non-Nix users may use the same hooks via pre-commit directly.

Hooks are automatically executed by git commit, unless the --no-verify flag is passed (escape hatch) and are also part of nix flake check.

The second commit in the patch contains fixes to calm shellcheck.

lorenz pushed revision 2 6da13e39 on base 77386b0f +172 -57 1 year ago

Fix clippy.

lorenz pushed revision 3 3e2696b9 on base 77386b0f +176 -57 1 year ago

Add comment about nixpkgs inputs after review.

fintohaps merged revision 6da13e39 at cbca3af2 1 year ago