Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nix: add lefthook #1167

Merged
merged 1 commit into from
Oct 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions NIX.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
4 changes: 4 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
mkShell {
buildInputs = [
ruby
nodejs
yarn
foreman

Expand All @@ -38,6 +39,9 @@
# for selenium tests
chromium
chromedriver

# for linters and git hooks
lefthook
];

# Keep gems installed in a subdirectory
Expand Down
Loading