-
Notifications
You must be signed in to change notification settings - Fork 196
/
.hlint.yaml
78 lines (60 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
# HLint configuration file
# https://github.com/ndmitchell/hlint
##########################
# Hints that apply only to the HLint source code
#####################################################################
## GROUPS OF HINTS WE TURN ON
- group: {name: future, enabled: true}
- group: {name: extra, enabled: true}
#####################################################################
## RESTRICTIONS
- extensions:
- default: false
- name: [ImportQualifiedPost]
- name: [DeriveDataTypeable, DeriveFunctor, GeneralizedNewtypeDeriving, NoMonomorphismRestriction, OverloadedStrings]
- 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: [DerivingVia, DeriveGeneric, DataKinds]
- {name: CPP, within: [HsColour, Config.Yaml, Test.Annotations]} # so it can be disabled to avoid GPL code
- {name: CPP, within: CmdLine} # Don't think this one is really necessary
- 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 meaningful argument names
- ignore: {name: Use const, within: Config.Yaml}
# TEMPORARY: this lint is deleted on HEAD
- ignore: {name: Use String}