From 848f9f095f788a05963df8aec8e1b9fe8cd22c64 Mon Sep 17 00:00:00 2001 From: jneira Date: Tue, 14 Jan 2020 10:48:31 +0100 Subject: [PATCH 1/2] Mention hlint data file handling --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 6a62dbe1e..07fad826a 100644 --- a/README.md +++ b/README.md @@ -152,6 +152,7 @@ HIE builds from source code, so there's a couple of extra steps. * `stack` must be in your PATH * `git` must be in your PATH * Stack local bin directory must be in your PATH. Get it with `stack path --local-bin` +* To make hlint suggestions work, `hie` must locate the [hlint configuration yaml file](https://raw.githubusercontent.com/ndmitchell/hlint/master/data/hlint.yaml). As last resort it will look for it in a subdirectory named `data` in the same directory where the `hie` executable is. Tip: you can quickly check if some command is in your path by running the command. If you receive some meaningful output instead of "command not found"-like message From 0bbe5b78cb7908138d062604ff5a3b40a6cf01bf Mon Sep 17 00:00:00 2001 From: jneira Date: Tue, 14 Jan 2020 13:15:05 +0100 Subject: [PATCH 2/2] List all possible hlint.yaml locations --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 07fad826a..97cbfd7db 100644 --- a/README.md +++ b/README.md @@ -152,7 +152,10 @@ HIE builds from source code, so there's a couple of extra steps. * `stack` must be in your PATH * `git` must be in your PATH * Stack local bin directory must be in your PATH. Get it with `stack path --local-bin` -* To make hlint suggestions work, `hie` must locate the [hlint configuration yaml file](https://raw.githubusercontent.com/ndmitchell/hlint/master/data/hlint.yaml). As last resort it will look for it in a subdirectory named `data` in the same directory where the `hie` executable is. +* To make hlint suggestions work, `hie` must locate the [hlint configuration yaml file](https://raw.githubusercontent.com/ndmitchell/hlint/master/data/hlint.yaml). The file is searched in order in the following locations: + * In the directory pointed by the environment variable `$HLINT_DATADIR`. + * If hie was installed using stack or cabal, in a tool-specific internal installation directory. + * And finally in a subdirectory named `data` inside the directory where the `hie` executable is. Tip: you can quickly check if some command is in your path by running the command. If you receive some meaningful output instead of "command not found"-like message