packages feed

hlint-3.6: .hlint.yaml

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