Skip to content

Commit 9d21805

Browse files
Ailrunmergify[bot]
andauthored
Patch pre-commit-hook to work with GHCIDE/hls-plugin-api codes (#1418)
* Fix pre-commit-hook to work with GHCIDE codes pre-commit does not load stylish-haskell configuration in subdirectories. As an imperfect workaround, this commit unifies all stylish-haskell into a single top-level config. * Update CONTRIBUTING.md Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
1 parent 02f18ae commit 9d21805

File tree

5 files changed

+17
-140
lines changed

5 files changed

+17
-140
lines changed

.stylish-haskell.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,22 @@ columns: 80
5656
newline: native
5757

5858
language_extensions:
59+
- BangPatterns
5960
- DataKinds
61+
- DeriveFunctor
62+
- DeriveGeneric
63+
- FlexibleContexts
64+
- GeneralizedNewtypeDeriving
65+
- KindSignatures
66+
- LambdaCase
67+
- NamedFieldPuns
6068
- OverloadedStrings
69+
- RecordWildCards
70+
- ScopedTypeVariables
71+
- StandaloneDeriving
72+
- TupleSections
73+
- TypeApplications
6174
- TypeOperators
75+
- ViewPatterns
6276

6377
cabal: true

CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ If you don't want to use [nix](https://nixos.org/guides/install-nix.html), you c
1717
{
1818
"hooks": [
1919
{
20-
"entry": "stylish-haskell -i ",
21-
"exclude": "(/test/testdata/*)",
20+
"entry": "stylish-haskell --inplace",
21+
"exclude": "(test/testdata/.*|hie-compat/.*)",
2222
"files": "\\.l?hs$",
2323
"id": "stylish-haskell",
2424
"language": "system",

ghcide/.stylish-haskell.yaml

-74
This file was deleted.

hls-plugin-api/.stylish-haskell.yaml

-63
This file was deleted.

nix/default.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ in (import sources.nixpkgs
5454
# default_stages = ["manual" "push"];
5555
hooks = {
5656
stylish-haskell.enable = true;
57-
stylish-haskell.excludes = [ "/test/testdata/*" "/hie-compat/*" ];
57+
stylish-haskell.excludes = [ "test/testdata/.*" "hie-compat/.*" ];
5858
};
5959
};
6060
}

0 commit comments

Comments
 (0)