From 2427686ffcbbb8f50930d471786a7152a3abe499 Mon Sep 17 00:00:00 2001 From: Bad Date: Sun, 3 Jul 2022 01:19:14 +0200 Subject: [PATCH] Add a pre-commit hook --- pre-commit.sh | 5 +++++ 1 file changed, 5 insertions(+) create mode 100755 pre-commit.sh diff --git a/pre-commit.sh b/pre-commit.sh new file mode 100755 index 0000000..5e3479f --- /dev/null +++ b/pre-commit.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env -S nix shell --quiet nixpkgs#bash nixpkgs#nixpkgs-fmt --ignore-environment --command bash + +# Install: ln -s ../../pre-commit.sh .git/hooks/pre-commit + +nixpkgs-fmt --check .