Skip to content

Commit 5949e19

Browse files
committed
Add stylish haskell import grouping rules
1 parent 7b00761 commit 5949e19

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

.github/workflows/stylish-haskell.yml

+5-8
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,19 @@ jobs:
2626
fail-fast: false
2727

2828
env:
29-
# Modify this value to "invalidate" the cabal cache.
30-
CABAL_CACHE_VERSION: "2023-11-20-3"
31-
32-
STYLISH_HASKELL_VERSION: "0.14.4.0"
29+
STYLISH_HASKELL_VERSION: "0.14.6.0"
3330

3431
STYLISH_HASKELL_PATHS: >
35-
cardano-testnet
3632
cardano-git-rev
3733
cardano-node
34+
cardano-node-capi
3835
cardano-node-chairman
36+
cardano-submit-api
37+
cardano-testnet
3938
cardano-tracer
40-
trace-resources
41-
cardano-node-capi
4239
trace-dispatcher
4340
trace-forward
44-
cardano-submit-api
41+
trace-resources
4542
4643
steps:
4744
- name: Download stylish-haskell

.stylish-haskell.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,18 @@ steps:
4141

4242
space_surround: false
4343

44+
# Principle 10
45+
group_imports: true
46+
47+
group_rules:
48+
- match: ^Cardano.Api\>
49+
- match: ^(Cardano|Ouroboros|PlutusCore|PlutusLedgerApi)\>
50+
- match: ^Prelude\>
51+
- match: ^(Control|Codec|Data|Formatting|GHC|Lens|Network|Numeric|Options|Prettyprinter|System|Text)\>
52+
- match: ^(Test.Gen.Cardano.Api)\>
53+
- match: ^(Test.Cardano|Test.Gen.Cardano|Testnet)\>
54+
- match: ^(Hedgehog|HaskellWorks.Hspec|Test)\>
55+
4456
- language_pragmas:
4557
style: vertical
4658

0 commit comments

Comments
 (0)