packages feed

hlint 1.9.28 → 1.9.29

raw patch · 4 files changed

+53/−5 lines, 4 filesdep ~extraPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: extra

API changes (from Hackage documentation)

Files

CHANGES.txt view
@@ -1,5 +1,8 @@ Changelog for HLint +1.9.29+    #219, add warnings about foldable methods on tuple+    Put warnings before suggestions in the HTML report 1.9.28     #215, spot newtype deriving inside classes 1.9.27
data/Default.hs view
@@ -509,6 +509,51 @@ warn "Evaluate" = zip [] [] ==> [] warn "Evaluate" = const x y ==> x +-- FOLDABLE + TUPLES++warn "Using foldr on tuple"   = foldr   f (x,b) z ==> f b z+warn "Using foldr' on tuple"  = foldr'  f (x,b) z ==> f b z+warn "Using foldl on tuple"   = foldl   f (x,b) z ==> f z b+warn "Using foldl' on tuple"  = foldl'  f (x,b) z ==> f z b+warn "Using foldMap on tuple" = foldMap f (x,b)   ==> f b+warn "Using foldr1 on tuple"  = foldr1  f (x,b)   ==> b+warn "Using foldl1 on tuple"  = foldl1  f (x,b)   ==> b+warn "Using elem on tuple"    = elem    x (x,b)   ==> x == b+warn "Using fold on tuple"    = fold      (x,b)   ==> b+warn "Using toList on tuple"  = toList    (x,b)   ==> b+warn "Using maximum on tuple" = maximum   (x,b)   ==> b+warn "Using minimum on tuple" = minimum   (x,b)   ==> b+warn "Using sum on tuple"     = sum       (x,b)   ==> b+warn "Using product on tuple" = product   (x,b)   ==> b+warn "Using concat on tuple"  = concat    (x,b)   ==> b+warn "Using and on tuple"     = and       (x,b)   ==> b+warn "Using or on tuple"      = or        (x,b)   ==> b+warn "Using any on tuple"     = any     f (x,b)   ==> f b+warn "Using all on tuple"     = all     f (x,b)   ==> f b++warn "Using foldr on tuple"   = foldr   f (x,y,b) z ==> f b z+warn "Using foldr' on tuple"  = foldr'  f (x,y,b) z ==> f b z+warn "Using foldl on tuple"   = foldl   f (x,y,b) z ==> f z b+warn "Using foldl' on tuple"  = foldl'  f (x,y,b) z ==> f z b+warn "Using foldMap on tuple" = foldMap f (x,y,b)   ==> f b+warn "Using foldr1 on tuple"  = foldr1  f (x,y,b)   ==> b+warn "Using foldl1 on tuple"  = foldl1  f (x,y,b)   ==> b+warn "Using elem on tuple"    = elem    x (x,y,b)   ==> x == b+warn "Using fold on tuple"    = fold      (x,y,b)   ==> b+warn "Using toList on tuple"  = toList    (x,y,b)   ==> b+warn "Using maximum on tuple" = maximum   (x,y,b)   ==> b+warn "Using minimum on tuple" = minimum   (x,y,b)   ==> b+warn "Using sum on tuple"     = sum       (x,y,b)   ==> b+warn "Using product on tuple" = product   (x,y,b)   ==> b+warn "Using concat on tuple"  = concat    (x,y,b)   ==> b+warn "Using and on tuple"     = and       (x,y,b)   ==> b+warn "Using or on tuple"      = or        (x,y,b)   ==> b+warn "Using any on tuple"     = any     f (x,y,b)   ==> f b+warn "Using all on tuple"     = all     f (x,y,b)   ==> f b++warn "Using null on tuple"   = null x   ==> False where _ = isTuple x+warn "Using length on tuple" = length x ==> 1     where _ = isTuple x+ -- COMPLEX  {-
hlint.cabal view
@@ -1,7 +1,7 @@ cabal-version:      >= 1.8 build-type:         Simple name:               hlint-version:            1.9.28+version:            1.9.29 license:            BSD3 license-file:       LICENSE category:           Development
src/Report.hs view
@@ -4,7 +4,7 @@  import Idea import Data.Tuple.Extra-import Data.List+import Data.List.Extra import Data.Maybe import Data.Version import System.FilePath@@ -27,9 +27,9 @@ writeReport dataDir file ideas = writeTemplate dataDir inner file     where         generateIds :: [String] -> [(String,Int)] -- sorted by name-        generateIds = map (head &&& length) . group . sort-        files = generateIds $ map (srcSpanFilename . ideaSpan) ideas-        hints = generateIds $ map hintName ideas+        generateIds = map (head &&& length) . group -- must be already sorted+        files = generateIds $ sort $ map (srcSpanFilename . ideaSpan) ideas+        hints = generateIds $ map hintName $ sortOn (negate . fromEnum . ideaSeverity &&& hintName) ideas         hintName x = show (ideaSeverity x) ++ ": " ++ ideaHint x          inner = [("VERSION",['v' : showVersion version]),("CONTENT",content),