-
Notifications
You must be signed in to change notification settings - Fork 53
/
.hlint.yaml
90 lines (77 loc) · 2.89 KB
/
.hlint.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
# Based on HLint configuration file from https://github.com/ndmitchell/hlint
- arguments: [--color]
# ------------------------------------------------------------------------------
# RESTRICTIONS
# ------------------------------------------------------------------------------
- extensions:
- default: false
- name:
- ApplicativeDo
- DataKinds
- DerivingStrategies
- GADTs
- FunctionalDependencies
- ImportQualifiedPost
- LambdaCase
- NoImplicitPrelude
- OverloadedStrings
- QuantifiedConstraints
- QuasiQuotes
- RecordWildCards
- StandaloneKindSignatures
- TemplateHaskell
- TypeFamilyDependencies
- UndecidableInstances
- UnicodeSyntax
- GeneralizedNewtypeDeriving
- flags:
- default: false
- name:
- -Wall
- -Wcompat
- -Wderiving-defaults
- -Widentities
- -Wincomplete-patterns
- -Wincomplete-record-updates
- -Wincomplete-uni-patterns
- -Wmissing-deriving-strategies
- -Wredundant-constraints
- -O2 -flate-specialise -fspecialise-aggressively
- modules:
# if you import Data.Set qualified, it must be as 'Set'
- { name: [Data.Set, Data.HashSet], as: Set }
- { name: [Data.Map, Data.HashMap.Strict, Data.HashMap.Lazy], as: Map }
# - {name: Control.Arrow, within: []} # Certain modules are banned entirely
- functions:
- { name: Data.List.NonEmpty.nub, within: [] }
- { name: Data.List.NonEmpty.nubBy, within: [] }
# ------------------------------------------------------------------------------
# OTHER HINTS
# ------------------------------------------------------------------------------
# - warn: {name: Use explicit module export list}
# ------------------------------------------------------------------------------
# HINTS
# ------------------------------------------------------------------------------
- error: { lhs: idea Warning, rhs: warn }
- error: { lhs: idea Suggestion, rhs: suggest }
- error: { lhs: ideaN Warning, rhs: warnN }
- error: { lhs: ideaN Suggestion, rhs: suggestN }
- error: { lhs: occNameString (occName (unLoc x)), rhs: rdrNameStr x }
- error: { lhs: occNameString (occName x), rhs: occNameStr x }
- error:
{
lhs: noLoc (HsVar noExtField (noLoc (mkRdrUnqual (mkVarOcc x)))),
rhs: strToVar x,
}
# ------------------------------------------------------------------------------
# IGNORES
# ------------------------------------------------------------------------------
- ignore: { name: Use let, within: [Test.All] }
- ignore: { name: Use String }
- ignore: { name: Avoid restricted qualification }
- ignore: { name: Redundant multi-way if }
- ignore: { name: Redundant bracket }
- ignore: { name: Eta reduce }
- ignore: { name: Avoid restricted alias }
- ignore: { name: Use tuple-section }
- ignore: { name: Use map with tuple-section }