]> git.immae.eu Git - github/fretlink/pronto-hlint.git/blame_incremental - README.md
Merge pull request #2 from paulrbr-fl/fix-travis-ci
[github/fretlink/pronto-hlint.git] / README.md
... / ...
CommitLineData
1# Pronto runner for Hlint
2
3[![Build Status](https://travis-ci.org/fretlink/pronto-hlint.svg?branch=master)](https://travis-ci.org/fretlink/pronto-hlint)
4[![Gem Version](https://badge.fury.io/rb/pronto-hlint.svg)](http://badge.fury.io/rb/pronto-hlint)
5
6Pronto runner for [Hlint](https://hackage.haskell.org/package/hlint), pluggable linting utility for Haskell. [What is Pronto?](https://github.com/mmozuras/pronto)
7
8## Prerequisites
9
10You'll need to install [hlint by yourself with cabal or stack][hlint-install]. If `hlint` is in your `PATH`, everything will simply work, otherwise you have to provide pronto-hlint your custom executable path (see [below](#configuration-of-hlint)).
11
12[hlint-install]: https://github.com/ndmitchell/hlint#installing-and-running-hlint
13
14## Configuration of Hlint
15
16Configuring Hlint via [.hlint.yaml][.hlint.yaml] will work just fine with pronto-hlint.
17
18[.hlint.yaml]: https://github.com/ndmitchell/hlint#customizing-the-hints
19
20## Configuration of Pronto-Hlint
21
22pronto-hlint can be configured by placing a `.pronto_hlint.yml` inside the directory where pronto will run.
23
24Following options are available:
25
26| Option | Meaning | Default |
27| ----------------- | ---------------------------------------------------------------------------------------- | ----------------------------------- |
28| hlint_executable | Hlint executable to call. | `hlint` (calls `hlint` in `PATH`) |
29| files_to_lint | What files to lint. Absolute path of offending file will be matched against this Regexp. | `(\.hs)$` |
30| cmd_line_opts | Command line options to pass to hlint when running | `` |
31
32Example configuration to call custom hlint executable and only lint files ending with `.my_custom_extension`:
33
34```yaml
35# .pronto_hlint.yml
36hlint_executable: '/my/custom/path/.bin/hlint'
37files_to_lint: '\.my_custom_extension$'
38cmd_line_opts: '-j $(nproc) --typecheck'
39```