I am trying to setup haskell-linter for vs-code.
I have installed hlint using cabal. Location of hlint
~/.cabal/bin/hlint
I have also added the above path in setting.json of VSCode.
"haskell.hlint.executablePath": "~/.cabal/bin/hlint"
But still getting the following error in vs-code:
Cannot hlint the haskell file. The hlint program was not found. Use the 'haskell.hlint.executablePath' setting to configure the location of 'hlint'
I am using Mac os. Can someone help ?
Edit 1 : Also tried adding the full path but still no success.
"haskell.hlint.executablePath": "/Users/ujjwal/.cabal/bin/hlint"
This seems to work for me. (Mac Intel)
On macOS, opening my terminal and typing: which hlint => /Users/admin/.local/bin/hlint
If the command can't find hlint, you might want to find out where it's installed on your machine and add it to your PATH.
Then went to vscode settings (cmd + ,) -> extensions -> haskell-linter, then pasted /Users/admin/.local/bin/hlint as the "Executable Path". You will need to paste your own result from which hlint obviously.