| Safe Haskell | None |
|---|
Language.Haskell.HLint
Description
This module provides a library interface to HLint. The current interface is strongly modelled on the command line interface, and is expected to evolve.
- hlint :: [String] -> IO [Suggestion]
- data Suggestion
- suggestionLocation :: Suggestion -> SrcLoc
- suggestionSeverity :: Suggestion -> Severity
- data Severity
Documentation
hlint :: [String] -> IO [Suggestion]Source
This function takes a list of command line arguments, and returns the given suggestions.
To see a list of arguments type hlint --help at the console.
This function writes to the stdout/stderr streams, unless --quiet is specified.
As an example:
do hints <- hlint ["src", "--ignore=Use map","--quiet"]
when (length hints > 3) $ error "Too many hints!"
suggestionLocation :: Suggestion -> SrcLocSource
From a suggestion, extract the file location it refers to.
suggestionSeverity :: Suggestion -> SeveritySource
From a suggestion, determine how severe it is.
How severe an issue is.
Constructors
| Ignore | The issue has been explicitly ignored and will usually be hidden (pass |
| Warning | Warnings are things that some people may consider improvements, but some may not. |
| Error | Errors are suggestions that are nearly always a good idea to apply. |