hlint 1.8.29 → 1.8.30
raw patch · 3 files changed
+12/−3 lines, 3 filesdep ~cpphs
Dependency ranges changed: cpphs
Files
- data/Default.hs +6/−0
- hlint.cabal +2/−2
- src/Hint/Naming.hs +4/−1
data/Default.hs view
@@ -101,6 +101,12 @@ error = all ((/=) a) ==> notElem a error = all (/= a) ==> notElem a error = all (a /=) ==> notElem a+error = findIndex ((==) a) ==> elemIndex a+error = findIndex (a ==) ==> elemIndex a+error = findIndex (== a) ==> elemIndex a+error = findIndices ((==) a) ==> elemIndices a+error = findIndices (a ==) ==> elemIndices a+error = findIndices (== a) ==> elemIndices a -- FOLDS
hlint.cabal view
@@ -1,7 +1,7 @@ cabal-version: >= 1.6 build-type: Simple name: hlint-version: 1.8.29+version: 1.8.30 -- license is GPL v2 only license: GPL license-file: LICENSE@@ -41,7 +41,7 @@ base == 4.*, process, filepath, directory, containers, transformers >= 0.0 && < 0.4, hscolour >= 1.17 && < 1.21,- cpphs >= 1.11 && < 1.14,+ cpphs >= 1.11 && < 1.15, haskell-src-exts >= 1.11 && < 1.14, uniplate >= 1.5 && < 1.7
src/Hint/Naming.hs view
@@ -7,6 +7,7 @@ Apply this to things that would get exported by default only Also allow prop_ as it's a standard QuickCheck idiom+ Also allow case_ as it's a standard test-framework-th idiom Also don't suggest anything mentioned elsewhere in the module <TEST>@@ -21,6 +22,8 @@ myTest = 1; my_test = 1 semiring'laws = 1 -- semiringLaws = ... data Yes = FOO_A | Foo_B -- data Yes = FOO_A | FooB+case_foo = 1+cast_foo = 1 -- castFoo = ... </TEST> -} @@ -75,7 +78,7 @@ suggestName :: String -> Maybe String-suggestName x = listToMaybe [f x | not $ isSym x || good || not (any isLower x) || "prop_" `isPrefixOf` x]+suggestName x = listToMaybe [f x | not $ isSym x || good || not (any isLower x) || "prop_" `isPrefixOf` x || "case_" `isPrefixOf` x] where good = all isAlphaNum $ drp '_' $ drp '\'' $ reverse $ drp '_' x drp x = dropWhile (== x)