Skip to content

Commit

Permalink
Merge pull request IntersectMBO#1130 from input-output-hk/erikd/hlint…
Browse files Browse the repository at this point in the history
…-hook

doc: Add hlint-stylish-haskell.md
  • Loading branch information
erikd authored May 31, 2022
2 parents 23f7700 + d0210d2 commit b2ffd0e
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions doc/hlint-stylish-haskell.md
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)
```

0 comments on commit b2ffd0e

Please sign in to comment.