forked from IntersectMBO/cardano-db-sync
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request IntersectMBO#1130 from input-output-hk/erikd/hlint…
…-hook doc: Add hlint-stylish-haskell.md
- Loading branch information
Showing
1 changed file
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Auto-running hlint and stylish-haskell on Commit | ||
|
||
This document describes how to have `hlint` and `stylish-haskell` locally on every commit. | ||
|
||
# Installing Them | ||
|
||
Installing these two is as simple as `cabal install hlint stylish-haskell` which will install them | ||
in `$HOME/.cabal/bin` which should then be added to your `PATH` environment variable. | ||
|
||
# Install the Git Pre-commit Hook | ||
|
||
In the `db-sync` repo, there is a shell script at `scripts/git-pre-commit-hook`. This can be | ||
symlinked to run as a Git pre-commit hook. If you go to the `.git` directory of your | ||
`cardano-db-sync` Git checkout and create the symlink as follows: | ||
``` | ||
(cd .git/hooks/ && ln -s ../../scripts/git-pre-commit-hook pre-commit) | ||
``` |