forked from ndmitchell/hlint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.hlint.yaml
66 lines (50 loc) · 2.36 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
# HLint configuration file
# https://github.com/ndmitchell/hlint
##########################
# Hints that apply only to the HLint source code
#####################################################################
## RESTRICTIONS
- extensions:
- default: false
- name: [DeriveDataTypeable, GeneralizedNewtypeDeriving, NoMonomorphismRestriction, OverloadedStrings]
- name: [PatternGuards, Rank2Types, RecordWildCards, ScopedTypeVariables, ViewPatterns, TupleSections, LambdaCase]
- name: [ExistentialQuantification, MultiParamTypeClasses]
- name: [FlexibleContexts, FlexibleInstances]
- {name: CPP, within: HsColour} # so it can be disabled to avoid GPL code
- flags:
- default: false
- {name: [-fno-warn-missing-fields, -fno-cse, -O0], within: CmdLine} # for cmdargs
- {name: [-fno-warn-incomplete-patterns, -fno-warn-overlapping-patterns]} # the pattern match checker is not very good
- modules:
- {name: [Data.Set, Data.HashSet], as: Set}
- {name: [Data.Map, Data.HashMap.Strict, Data.HashMap.Lazy], as: Map}
- {name: Control.Arrow, within: []}
- functions:
- {name: unsafeInterleaveIO, within: Parallel}
- {name: unsafePerformIO, within: [Util.exitMessageImpure, Test.Util.ref]}
- {name: unsafeCoerce, within: [Util.gzip]}
#####################################################################
## OTHER HINTS
- warn: {name: Use explicit module export list}
#####################################################################
## HINTS
- error: {lhs: QVarOp a (UnQual b x), rhs: toNamed x}
- error: {lhs: QConOp a (UnQual b x), rhs: toNamed x}
- error: {lhs: UnQual a (Symbol b x), rhs: toNamed x}
- error: {lhs: UnQual a (Ident b x), rhs: toNamed x}
- error: {lhs: Var a (toNamed x), rhs: toNamed x}
- error: {lhs: Con a (toNamed x), rhs: toNamed x}
- error: {lhs: idea Warning, rhs: warn}
- error: {lhs: idea Suggestion, rhs: suggest}
- error: {lhs: ideaN Warning, rhs: warnN}
- error: {lhs: ideaN Suggestion, rhs: suggestN}
#####################################################################
## IGNORES
# would require module cycles
- ignore: {name: Use toNamed, within: HSE.Util}
# doesn't fit with the other statements
- ignore: {name: Use let, within: [HLint, Test.All]}
# would be a lot of is/from exports
- ignore: {name: Use explicit module export list, within: HSE.Util}
# this const has meaingful argument names
- ignore: {name: Use const, within: Config.Yaml}