Skip to content

Commit 6a492ad

Browse files
committed
Update CONTRIBUTING.md
1 parent a777684 commit 6a492ad

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

CONTRIBUTING.md

+35
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,40 @@
11
# Contributors Guide
22

3+
## Pre-commit hook
4+
We are using [pre-commit-hook.nix](https://github.com/cachix/pre-commit-hooks.nix) to configure git pre-commit hook for formatting. Although it is possible to run formatting manually, we recommend you to use it to set pre-commit hook as our CI checks pre-commit hook is applied or not.
5+
6+
You can configure the pre-commit-hook by running
7+
8+
``` bash
9+
nix-shell
10+
```
11+
12+
If you don't want to use [nix](https://nixos.org/guides/install-nix.html), you can instead use [pre-commit](https://pre-commit.com) with the following config.
13+
14+
```json
15+
{
16+
"repos": [
17+
{
18+
"hooks": [
19+
{
20+
"entry": "stylish-haskell -i ",
21+
"exclude": "(/test/testdata/*)",
22+
"files": "\\.l?hs$",
23+
"id": "stylish-haskell",
24+
"language": "system",
25+
"name": "stylish-haskell",
26+
"pass_filenames": true,
27+
"types": [
28+
"file"
29+
]
30+
}
31+
],
32+
"repo": "local"
33+
}
34+
]
35+
}
36+
```
37+
338
## Testing
439

540
The tests make use of the [Tasty](https://github.com/feuerbach/tasty) test framework.

0 commit comments

Comments
 (0)