hlint
Suggest improvements for Haskell code
TLDR
Display suggestions for a given file
Check all Haskell files and generate a report
Automatically apply most suggestions
Display additional options
Generate a settings file ignoring all outstanding hints
SYNOPSIS
hlint [OPTIONS] [FILES]
PARAMETERS
--version
Display the version number.
--help
Display help information.
--cpp
Run the C preprocessor on the files.
--ignore
Ignore a specific error.
--report
Produce a report of suggestions.
--refactor
Apply suggestions directly to the files.
--no-color
Disable colored output.
--output
Specify the output file for the report.
--with-ghc
Specify which ghc to use.
DESCRIPTION
hlint is a tool that analyzes Haskell code and suggests improvements. It can identify potential bugs, style issues, and opportunities for simplification. It uses a flexible rule-based system, allowing users to customize the checks performed.
hlint aims to improve code quality and maintainability by providing automated feedback on code style and correctness. It can be integrated into development workflows, such as CI/CD pipelines, to ensure code adheres to defined standards. The tool is language-aware, specifically designed to work with Haskell's syntax and semantics, and is capable of offering refactoring suggestions.
CAVEATS
hlint relies on a rule-based system, so its effectiveness depends on the quality and comprehensiveness of the rules. Customizing rules may require knowledge of Haskell's syntax and semantics.
RULE CONFIGURATION
hlint's behavior is controlled by rules specified in .hlint.yaml files. These files define the checks to be performed and the suggestions to be made.
INTEGRATION
hlint can be integrated into various IDEs and build systems, providing real-time feedback on code quality.
HISTORY
hlint was developed as a practical tool for improving Haskell code quality. It has evolved over time, with contributions from various developers, to include a wider range of checks and refactoring suggestions. It is widely used in the Haskell community.