on master help sign in
Use new HLint config file.

Ignore a couple of unhelpful diagnostics.

commit372560bef398485da700363e3133ef899dffc958 authorNiklas Larsson <niklas@mm.st> dateSat 31 Mar 2018, 14:24 (9 years ago) parente393bf0
2 files changed+61−34
.hlint.yaml+61 HLint.hs−34
.hlint.yamlnew file+61
@@ -0,0 +1,61 @@
1+# HLint configuration file
2+# https://github.com/ndmitchell/hlint
3+##########################
4+
5+# This file contains a template configuration file, which is typically
6+# placed as .hlint.yaml in the root of your project
7+
8+
9+# Specify additional command line arguments
10+#
11+# - arguments: [--color, --cpp-simple, -XQuasiQuotes]
12+
13+
14+# Control which extensions/flags/modules/functions can be used
15+#
16+# - extensions:
17+# - default: false # all extension are banned by default
18+# - name: [PatternGuards, ViewPatterns] # only these listed extensions can be used
19+# - {name: CPP, within: CrossPlatform} # CPP can only be used in a given module
20+#
21+# - flags:
22+# - {name: -w, within: []} # -w is allowed nowhere
23+#
24+# - modules:
25+# - {name: [Data.Set, Data.HashSet], as: Set} # if you import Data.Set qualified, it must be as 'Set'
26+# - {name: Control.Arrow, within: []} # Certain modules are banned entirely
27+#
28+# - functions:
29+# - {name: unsafePerformIO, within: []} # unsafePerformIO can only appear in no modules
30+
31+
32+# Add custom hints for this project
33+#
34+# Will suggest replacing "wibbleMany [myvar]" with "wibbleOne myvar"
35+# - error: {lhs: "wibbleMany [x]", rhs: wibbleOne x}
36+
37+
38+# Turn on hints that are off by default
39+#
40+# Ban "module X(module X) where", to require a real export list
41+# - warn: {name: Use explicit module export list}
42+#
43+# Replace a $ b $ c with a . b $ c
44+# - group: {name: dollar, enabled: true}
45+#
46+# Generalise map to fmap, ++ to <>
47+# - group: {name: generalise, enabled: true}
48+
49+
50+# Ignore some builtin hints
51+# - ignore: {name: Use let}
52+# - ignore: {name: Use const, within: SpecialModule} # Only within certain modules
53+- ignore: {name: Use camelCase}
54+- ignore: {name: Reduce duplication}
55+
56+# Define some custom infix operators
57+# - fixity: infixr 3 ~^#^~
58+
59+
60+# To generate a suitable file for HLint do:
61+# $ hlint --default > .hlint.yaml
HLint.hsdeleted−34
@@ -1,34 +0,0 @@
1−{-# LANGUAGE TemplateHaskell #-}
2−-- --------------------------------------------------------------- [ HLint.hs ]
3−-- HLint suggestions we like.
4−--
5−-- This is a work in progress and the list of
6−-- suggestions/warnings/errors will vary.
7−--
8−-- -------------------------------------------------------------------- [ EOH ]
9−
10−-- import "hint" HLint.HLint -- In case we want to use all of them.
11−
12−-- ------------------------------------------------------------ [ Suggestions ]
13−-- Styling that are good Suggestions but are okay if found.
14−
15−suggest "Use exitSuccess"
16−suggest "Use concatMap"
17−suggest "Use unwords"
18−suggest "Use null"
19−suggest "Redundant $"
20−suggest "Use list literal pattern"
21−suggest "Use list literal"
22−
23−-- ------------------------------------------------------------------- [ Warn ]
24−-- Styling that we think a programmer should be warned about using.
25−
26−
27−-- ------------------------------------------------------------------ [ Error ]
28−-- Styling that we think a programmer should not use at all.
29−
30−
31−-- ----------------------------------------------------------------- [ Ignore ]
32−-- Suggestions we want to ignore.
33−
34−-- -------------------------------------------------------------------- [ EOF ]