Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
77 lines (60 sloc) 3.03 KB
# 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, NamedFieldPuns]
- name: [FlexibleContexts, FlexibleInstances]
- name: [PackageImports]
- name: [ConstraintKinds, RankNTypes, TypeFamilies]
- {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
- {name: [-fno-warn-missing-fields], within: GHC.Util.DynFlags} # enable missing record fields
- 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: nub, within: []}
#####################################################################
## 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}
# temporary disable while we have unused top binds here
- ignore: {name : Avoid restricted flags, within: GHC.Util.HsExpr}
# ghc-exactprint, apply-refact code
- ignore: {name : Use newtype instead of data, within: [GHC.Util.Language.Haskell.GHC.ExactPrint.Types]}
# It is used and on Ubuntu 8.8, GHC errors if it's not enabled.
- ignore: {name : Unused LANGUAGE pragma, within: [GHC.Util.Language.Haskell.GHC.ExactPrint.Types]}
You can’t perform that action at this time.