]> git.immae.eu Git - github/fretlink/pronto-hlint.git/blame - README.md
Merge pull request #2 from paulrbr-fl/fix-travis-ci
[github/fretlink/pronto-hlint.git] / README.md
CommitLineData
9c1df047 1# Pronto runner for Hlint
ce89f9ed 2
9c1df047
PB
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)
ce89f9ed 5
9c1df047 6Pronto runner for [Hlint](https://hackage.haskell.org/package/hlint), pluggable linting utility for Haskell. [What is Pronto?](https://github.com/mmozuras/pronto)
5001cb27 7
ce89f9ed
MM
8## Prerequisites
9
9c1df047 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)).
ce89f9ed 11
9c1df047 12[hlint-install]: https://github.com/ndmitchell/hlint#installing-and-running-hlint
ce89f9ed 13
9c1df047 14## Configuration of Hlint
676cea90 15
9c1df047 16Configuring Hlint via [.hlint.yaml][.hlint.yaml] will work just fine with pronto-hlint.
1845f2e3 17
9c1df047 18[.hlint.yaml]: https://github.com/ndmitchell/hlint#customizing-the-hints
1845f2e3 19
9c1df047 20## Configuration of Pronto-Hlint
1845f2e3 21
9c1df047 22pronto-hlint can be configured by placing a `.pronto_hlint.yml` inside the directory where pronto will run.
1845f2e3
MD
23
24Following options are available:
25
cf6aab4b
MD
26| Option | Meaning | Default |
27| ----------------- | ---------------------------------------------------------------------------------------- | ----------------------------------- |
9c1df047
PB
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 | `` |
1845f2e3 31
9c1df047 32Example configuration to call custom hlint executable and only lint files ending with `.my_custom_extension`:
1845f2e3
MD
33
34```yaml
9c1df047
PB
35# .pronto_hlint.yml
36hlint_executable: '/my/custom/path/.bin/hlint'
1845f2e3 37files_to_lint: '\.my_custom_extension$'
9c1df047 38cmd_line_opts: '-j $(nproc) --typecheck'
1845f2e3 39```