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.
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.
Fix clippy.
Add comment about nixpkgs inputs after review.