]> git.immae.eu Git - github/fretlink/pronto-hlint.git/blobdiff - README.md
Merge pull request #2 from paulrbr-fl/fix-travis-ci
[github/fretlink/pronto-hlint.git] / README.md
index f07434ca70fc3f78b2f4bb87d54abc1eecfd988e..7cec7d60a9bc762943feff8b474462233994ef39 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,21 +1,39 @@
-# Pronto runner for ESLint
+# Pronto runner for Hlint
 
-[![Code Climate](https://codeclimate.com/github/mmozuras/pronto-eslint.png)](https://codeclimate.com/github/mmozuras/pronto-eslint)
-[![Build Status](https://travis-ci.org/mmozuras/pronto-eslint.png)](https://travis-ci.org/mmozuras/pronto-eslint)
-[![Gem Version](https://badge.fury.io/rb/pronto-eslint.png)](http://badge.fury.io/rb/pronto-eslint)
-[![Dependency Status](https://gemnasium.com/mmozuras/pronto-eslint.png)](https://gemnasium.com/mmozuras/pronto-eslint)
+[![Build Status](https://travis-ci.org/fretlink/pronto-hlint.svg?branch=master)](https://travis-ci.org/fretlink/pronto-hlint)
+[![Gem Version](https://badge.fury.io/rb/pronto-hlint.svg)](http://badge.fury.io/rb/pronto-hlint)
 
-Pronto runner for [ESlint](http://eslint.org), pluggable linting utility for JavaScript and JSX. [What is Pronto?](https://github.com/mmozuras/pronto)
+Pronto runner for [Hlint](https://hackage.haskell.org/package/hlint), pluggable linting utility for Haskell. [What is Pronto?](https://github.com/mmozuras/pronto)
 
 ## Prerequisites
 
-You'll need to install [eslint by yourself][eslint-install].
+You'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)).
 
-[eslint-install]: http://eslint.org/docs/user-guide/getting-started
+[hlint-install]: https://github.com/ndmitchell/hlint#installing-and-running-hlint
 
-## Configuration
+## Configuration of Hlint
 
-Configuring ESLint via [.eslintrc and consorts][eslintrc] and excludes via [.eslintignore][eslintignore] will work just fine with pronto-eslint.
+Configuring Hlint via [.hlint.yaml][.hlint.yaml] will work just fine with pronto-hlint.
 
-[eslintrc]: http://eslint.org/docs/user-guide/configuring#configuration-file-formats
-[eslintignore]: http://eslint.org/docs/user-guide/configuring#ignoring-files-and-directories
+[.hlint.yaml]: https://github.com/ndmitchell/hlint#customizing-the-hints
+
+## Configuration of Pronto-Hlint
+
+pronto-hlint can be configured by placing a `.pronto_hlint.yml` inside the directory where pronto will run.
+
+Following options are available:
+
+| Option            | Meaning                                                                                  | Default                             |
+| ----------------- | ---------------------------------------------------------------------------------------- | ----------------------------------- |
+| hlint_executable  | Hlint executable to call.                                                                | `hlint` (calls `hlint` in `PATH`)   |
+| files_to_lint     | What files to lint. Absolute path of offending file will be matched against this Regexp. | `(\.hs)$`                           |
+| cmd_line_opts     | Command line options to pass to hlint when running                                       | ``                                  |
+
+Example configuration to call custom hlint executable and only lint files ending with `.my_custom_extension`:
+
+```yaml
+# .pronto_hlint.yml
+hlint_executable: '/my/custom/path/.bin/hlint'
+files_to_lint: '\.my_custom_extension$'
+cmd_line_opts: '-j $(nproc) --typecheck'
+```