packages feed

hlint 2.1.21 → 2.1.22

raw patch · 5 files changed

+16/−8 lines, 5 filesdep ~ghc-lib-parserPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: ghc-lib-parser

API changes (from Hackage documentation)

Files

CHANGES.txt view
@@ -1,5 +1,9 @@ Changelog for HLint (* = breaking change) +2.1.22, released 2019-05-25+    #634, suggest modifyIORef ==> writeIORef when applicable+    #642, suggest null in more places+    #640, reenable GHC parsing 2.1.21, released 2019-05-19     #637, temporary workaround for GHC parser segfaults 2.1.20, released 2019-05-15
README.md view
@@ -245,7 +245,7 @@  For `ANN` pragmas it is important to put them _after_ any `import` statements. If you have the `OverloadedStrings` extension enabled you will need to give an explicit type to the annotation, e.g. `{-# ANN myFunction ("HLint: ignore" :: String) #-}`. The `ANN` pragmas can also increase compile times or cause more recompilation than otherwise required, since they are evaluated by `TemplateHaskell`. -For `{-# HLINT #-}` pragmas GHC may give a warning about an unrecognised pragma, which can be supressed with `-Wno-unrecognised-pragmas`.+For `{-# HLINT #-}` pragmas GHC may give a warning about an unrecognised pragma, which can be suppressed with `-Wno-unrecognised-pragmas`.  For `{- HLINT -}` comments they are likely to be treated as comments in syntax highlighting, which can lead to them being overlooked. 
data/hlint.yaml view
@@ -155,6 +155,8 @@     - warn: {lhs: "zipWith (,)", rhs: zip}     - warn: {lhs: "zipWith3 (,,)", rhs: zip3}     - hint: {lhs: length x == 0, rhs: null x, note: IncreasesLaziness}+    - hint: {lhs: length x < 1, rhs: null x, note: IncreasesLaziness}+    - hint: {lhs: length x <= 0, rhs: null x, note: IncreasesLaziness}     - hint: {lhs: "x == []", rhs: null x}     - hint: {lhs: length x /= 0, rhs: not (null x), note: IncreasesLaziness, name: Use null}     - hint: {lhs: "\\x -> [x]", rhs: "(:[])", name: "Use :"}@@ -535,6 +537,11 @@     - hint: {lhs: throw (ErrorCall a), rhs: error a}     - warn: {lhs: toException NonTermination, rhs: nonTermination}     - warn: {lhs: toException NestedAtomically, rhs: nestedAtomically}++    # IOREF++    - hint: {lhs: modifyIORef r (const x), rhs: writeIORef r x}+    - hint: {lhs: modifyIORef r (\v -> x), rhs: writeIORef r x}      # STOREABLE/PTR 
hlint.cabal view
@@ -1,7 +1,7 @@ cabal-version:      >= 1.18 build-type:         Simple name:               hlint-version:            2.1.21+version:            2.1.22 license:            BSD3 license-file:       LICENSE category:           Development@@ -60,7 +60,7 @@         extra >= 1.6.6,         refact >= 0.3,         aeson >= 1.1.2.0,-        ghc-lib-parser >= 0.20190423+        ghc-lib-parser >= 0.20190523      if flag(gpl)         build-depends: hscolour >= 1.21
src/HSE/All.hs view
@@ -225,13 +225,10 @@             (ParseFailed sl msg, pfailed) ->                 failOpParseModuleEx ppstr flags file str sl msg $ fromPFailed pfailed     where-        -- TEMPORARY HACK TO AVOID EVALUATING parseFileGhcLib-        -- see https://github.com/ndmitchell/hlint/issues/637-        -- fromPFailed (PFailed x) = Just x+        fromPFailed (PFailed x) = Just x         fromPFailed _ = Nothing -        -- TEMPORARY HACK-        -- fromPOk (POk _ x) = Just x+        fromPOk (POk _ x) = Just x         fromPOk _ = Nothing          fixity = fromMaybe [] $ fixities $ hseFlags flags