# 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] - 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}