hlint
hlint copied to clipboard
Haskell source code suggestions
Closes https://github.com/ndmitchell/hlint/issues/1434 Supercedes #1435, updated for latest `master`.
The `yaml` package has a [`Data.Yaml.Include`](https://hackage.haskell.org/package/yaml-0.11.11.2/docs/Data-Yaml-Include.html) API which allows you to use `include` directives to reference other files. We want to use this to allow us to have an `hlint-rules`...
We had an `hlint` rule like this: ```yaml modules: - name: [Network.HTTP.Client] message: "Please import OpenTelemetry.Instrumentation.HttpClient instead so that requests may be properly traced." ``` This rule doesn't do anything....
Essentially a continuation of the already merged https://github.com/ndmitchell/hlint/pull/1569. One thing I'm unsure about: Would these hints also catch/apply to `Data.Set.toList` calls (based on the `Foldable` instance for `Set`)? Or would...
HLint seems to trip on that piece of code: ```haskell import Data.Bits (shiftL, shiftR, (.|.), (.&.)) #if MIN_VERSION_base(4,7,0) import Data.Bits (finiteBitSize) #else import Data.Bits (Bits, bitSize) finiteBitSize :: (Bits a)...
```haskell main = do e >= \case Left err -> do putStrLn err exitFailure Right e -> pure e ``` This triggers this linter warning: ``` Warning: Redundant Found: getContents...
```haskell getContents myLexer pExp >>= \case ... ``` This triggers linter warning:  Applying this refactoring would create a pipeline where the flow in the...
upgrade from the ghc-9.12 to the ghc-9.14 api. fixes https://github.com/ndmitchell/hlint/issues/1672.
this is expected (and the failure to produce a build plan deliberate). the current version of hlint requires a ghc-lib-parser-9.12.* these versions of ghc-lib-parser cannot be built by compilers >...
``` $ hlint --version HLint v3.10, (C) Neil Mitchell 2006-2025 ``` Example: ``` module Test where test1 = if x then pure () else y test2 = if x then...