|
1 | 1 | # HLint configuration file
|
2 | 2 | # https://github.com/ndmitchell/hlint
|
3 | 3 |
|
4 |
| -# Not considered useful hints |
5 |
| -- ignore: {name: "Redundant do"} |
6 |
| -- ignore: {name: "Use section"} |
7 |
| -- ignore: {name: "Use camelCase"} |
8 |
| -- ignore: {name: "Use list comprehension"} |
9 |
| -- ignore: {name: "Redundant if"} |
10 |
| -- ignore: {name: "Avoid lambda"} |
11 |
| -- ignore: {name: "Eta reduce"} |
12 |
| -- ignore: {name: "Use fmap"} # specific for GHC 7.8 compat |
13 |
| -- ignore: {name: "Parse error"} # we trust the compiler over HLint |
14 |
| -- ignore: {name: "Use =="} # Creates infinite loops in `EQ` using expressions |
15 |
| -- ignore: {name: "Evaluate"} |
16 |
| -- ignore: {name: "Use &&&"} |
17 |
| -- ignore: {name: "Redundant compare"} |
18 |
| -- ignore: {name: "Use Just"} |
19 |
| -- ignore: {name: "Avoid lambda using `infix`"} |
20 |
| - |
21 |
| -# Added in hlint-2.0.10, ignoring for now |
22 |
| -- ignore: {name: "Unnecessary hiding"} |
23 |
| -- ignore: {name: "Use lambda-case"} |
24 |
| - |
25 |
| -- ignore: {name: "Use fewer imports", within: [ |
26 |
| - "System.Process.Read", # Related to 'Hide post-AMP warnings' comment |
27 |
| - "Stack.Exec" # ifdef for System.Process.Read |
28 |
| - ] |
29 |
| -} |
30 |
| - |
31 |
| -- ignore: {name: "Use fromMaybe", within: [ |
32 |
| - "Stack.Types.Config.explicitSetupDeps" # Related to 'explicit pattern matching is clearer' comment |
33 |
| - ] |
34 |
| -} |
35 |
| - |
36 |
| -# For clarity (related to do syntax) |
37 |
| -- ignore: {name: "Reduce duplication", within: [ |
38 |
| - "Network.HTTP.Download.VerifiedSpec", |
39 |
| - "Stack.PackageDumpSpec", |
40 |
| - "Stack.Types.StackT", |
41 |
| - "Stack.Docker" |
42 |
| - ] |
43 |
| -} |
44 |
| - |
45 | 4 | - error: {lhs: "Network.HTTP.Client.MultipartFormData.formDataBody", rhs: "Network.HTTP.StackClient.formDataBody"}
|
46 | 5 | - error: {lhs: "Network.HTTP.Client.MultipartFormData.partBS", rhs: "Network.HTTP.StackClient.partBS"}
|
47 | 6 | - error: {lhs: "Network.HTTP.Client.MultipartFormData.partFileRequestBody", rhs: "Network.HTTP.StackClient.partFileRequestBody"}
|
|
83 | 42 | - error: {lhs: "Network.HTTP.Types.hContentLength", rhs: "Network.HTTP.StackClient.hContentLength"}
|
84 | 43 | - error: {lhs: "Network.HTTP.Types.hContentMD5", rhs: "Network.HTTP.StackClient.hContentMD5"}
|
85 | 44 | - error: {lhs: "Network.HTTP.Types.methodPut", rhs: "Network.HTTP.StackClient.methodPut"}
|
86 |
| -- ignore: {name: "Use alternative", within: "Network.HTTP.StackClient"} |
| 45 | + |
| 46 | +# We define the above alternatives but then must ignore these with |
| 47 | +# ignore "Use alternative" within Network.HTTP.StackClient. |
| 48 | +- ignore: |
| 49 | + name: "Use alternative" |
| 50 | + within: |
| 51 | + - Network.HTTP.StackClient |
| 52 | + |
| 53 | +# Not considered useful hints |
| 54 | +- ignore: {name: "Redundant do"} |
| 55 | +- ignore: {name: "Use section"} |
| 56 | +- ignore: {name: "Use camelCase"} |
| 57 | +- ignore: {name: "Use list comprehension"} |
| 58 | +- ignore: {name: "Redundant if"} |
| 59 | +- ignore: {name: "Avoid lambda"} |
| 60 | +- ignore: {name: "Eta reduce"} |
| 61 | +- ignore: {name: "Use fmap"} # specific for GHC 7.8 compat |
| 62 | +- ignore: {name: "Parse error"} # we trust the compiler over HLint |
| 63 | +- ignore: {name: "Use =="} # Creates infinite loops in `EQ` using expressions |
| 64 | +- ignore: {name: "Evaluate"} |
| 65 | +- ignore: {name: "Use &&&"} |
| 66 | +- ignore: {name: "Redundant compare"} |
| 67 | +- ignore: {name: "Use Just"} |
| 68 | +- ignore: {name: "Avoid lambda using `infix`"} |
| 69 | + |
| 70 | +# Added in hlint-2.0.10, ignoring for now |
| 71 | +- ignore: {name: "Unnecessary hiding"} |
| 72 | +- ignore: {name: "Use lambda-case"} |
| 73 | + |
| 74 | +- ignore: |
| 75 | + name: "Use fewer imports" |
| 76 | + within: |
| 77 | + - System.Process.Read # Related to 'Hide post-AMP warnings' comment |
| 78 | + - Stack.Exec # ifdef for System.Process.Read |
| 79 | + |
| 80 | +# Related to 'explicit pattern matching is clearer' comment |
| 81 | +- ignore: |
| 82 | + name: "Use fromMaybe" |
| 83 | + within: |
| 84 | + - Stack.Types.Config.explicitSetupDeps |
| 85 | + |
| 86 | +# For clarity (related to do syntax) |
| 87 | +- ignore: |
| 88 | + name: "Reduce duplication" |
| 89 | + within: |
| 90 | + - Network.HTTP.Download.VerifiedSpec |
| 91 | + - Stack.PackageDumpSpec |
| 92 | + - Stack.Types.StackT |
| 93 | + - Stack.Docker |
87 | 94 |
|
88 | 95 | # Gives an incorrect hint that breaks type checking due to mismatched types
|
89 |
| -- ignore: {name: "Too strict maybe", within: "Stack.Package" } |
90 |
| -- ignore: {name: "Too strict maybe", within: "Stack.Config" } |
| 96 | +- ignore: |
| 97 | + name: "Too strict maybe" |
| 98 | + within: |
| 99 | + - Stack.Config |
| 100 | + - Stack.Package |
0 commit comments