-
Notifications
You must be signed in to change notification settings - Fork 23
/
.stylish-haskell.yaml
114 lines (93 loc) · 2.66 KB
/
.stylish-haskell.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# Stylish-haskell configuration file.
# Principles:
#
# 1. Amount of indent should not be dependent on the length of the previous line
# 2. Imports lists should be compact
# 3. All linting rules that delete comments should be disabled
# 4. No inline indenting, for example indent of ->, =, <-, as
# 5. Redunant imports and pragmas should be removed
# 6. Consistent syntax
# 7. No trailing whitespaces
# 8. Slightly generous screen width assumed
# 9. All Haskell files in the project are subject to code formatting style
# 10. Import grouping is handled by stylish-haskell
steps:
# Principle 4
- simple_align:
cases: false
top_level_patterns: false
# Principle 3
records: false
# Import cleanup
- imports:
align: global
# Principle 1,2
list_align: with_module_name
# Principle 4
pad_module_names: false
# Principle 2
long_list_align: inline
empty_list_align: inherit
list_padding: 2
separate_lists: true
space_surround: false
# Principle 10
group_imports: true
group_rules:
- match: ^Cardano.Api\>
- match: ^(Cardano|Ouroboros|PlutusCore|PlutusLedgerApi)\>
- match: ^Prelude\>
- match: ^(Control|Codec|Data|Formatting|GHC|Lens|Network|Numeric|Options|Prettyprinter|System|Text)\>
- match: ^(Test.Gen.Cardano.Api)\>
- match: ^(Test.Cardano|Test.Gen.Cardano)\>
- match: ^(Hedgehog|HaskellWorks.Hspec|Test)\>
- language_pragmas:
style: vertical
align: false
# Principle 5
remove_redundant: true
# Principle 6
language_prefix: LANGUAGE
# Principle 7
- trailing_whitespace: {}
# Principle 8
columns: 100
newline: native
# Principle 9
#
# These syntax-affecting language extensions are enabled so that
# stylish-haskell wouldn't fail with parsing errors when processing files
# in projects that have those extensions enabled in the .cabal file
# rather than locally.
#
# In particular language extensions with British and American spellings
# that we use should be included here until stylish-haskell supports
# the British spelling.
language_extensions:
- BangPatterns
- ConstraintKinds
- DataKinds
- DefaultSignatures
- DeriveDataTypeable
- DeriveGeneric
- ExistentialQuantification
- FlexibleContexts
- FlexibleInstances
- FunctionalDependencies
- GADTs
- GeneralizedNewtypeDeriving
- LambdaCase
- MultiParamTypeClasses
- MultiWayIf
- OverloadedStrings
- PolyKinds
- RecordWildCards
- ScopedTypeVariables
- StandaloneDeriving
- TemplateHaskell
- TupleSections
- TypeApplications
- TypeFamilies
- ViewPatterns
- ExplicitNamespaces
cabal: true