-
Notifications
You must be signed in to change notification settings - Fork 1
/
.hlint.yaml
68 lines (53 loc) · 2.57 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
# HLint configuration file
# https://github.com/ndmitchell/hlint
##########################
# Hints that apply only to the HLint source code
#####################################################################
## RESTRICTIONS
- extensions:
- default: false
- name: [DeriveDataTypeable, DeriveFunctor, GeneralizedNewtypeDeriving, NoMonomorphismRestriction, OverloadedStrings, QuasiQuotes]
- name: [MultiWayIf, PatternGuards, RecordWildCards, ViewPatterns, PatternSynonyms, TupleSections, LambdaCase]
- name: [Rank2Types, ScopedTypeVariables]
- name: [ExistentialQuantification, MultiParamTypeClasses, NamedFieldPuns]
- name: [FlexibleContexts, FlexibleInstances]
- name: [PackageImports]
- name: [ConstraintKinds, RankNTypes, TypeFamilies]
- name: [TemplateHaskell ]
- {name: CPP, within: [HsColour, Config.Yaml, Test.Annotations]} # so it can be disabled to avoid GPL code
- flags:
- default: false
- {name: [-Wno-missing-fields, -fno-cse, -O0], within: CmdLine} # for cmdargs
- {name: [-Wno-incomplete-patterns, -Wno-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, Timing]}
- {name: unsafeCoerce, within: [Util.gzip, GHC.Util.Refact.Utils]}
- {name: Data.List.nub, within: []}
- {name: Data.List.nubBy, within: []}
- {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
# doesn't fit with the other statements
- ignore: {name: Use let, within: [HLint, Test.All]}
# this const has meaingful argument names
- ignore: {name: Use const, within: Config.Yaml}
# TEMPORARY: this lint is deleted on HEAD
- ignore: {name: Use String}