diff --git a/NIX.md b/NIX.md index d264e10c6..f5e1e7ac1 100644 --- a/NIX.md +++ b/NIX.md @@ -87,3 +87,13 @@ $ bin/rails test:system The Selenium tests are run by having Nix install Chromium and ChromeDriver and set a `SELENIUM_CHROME_BINARY` environment variable to point Selenium at Chromium in `test/application_system_test_case.rb`. + +## Precommit Hooks + +Precommit hooks are managed by `lefthook`, which is automatically installed +into the Nix development shell. Install the hooks to get them to run on every +commit: + +```shell-session +$ lefthook install +``` diff --git a/flake.nix b/flake.nix index b0d775996..07566f966 100644 --- a/flake.nix +++ b/flake.nix @@ -26,6 +26,7 @@ mkShell { buildInputs = [ ruby + nodejs yarn foreman @@ -38,6 +39,9 @@ # for selenium tests chromium chromedriver + + # for linters and git hooks + lefthook ]; # Keep gems installed in a subdirectory