haskell / haskell/stylish-haskell
Find options from cabal files based on the location of the input file, not PWD
- Dominant language
- Haskell
- Stars
- 1k
- Forks
- 153
- PR merge metrics
- No merged PRs in 30d
Description
At the moment, `stylish-haskell` looks for `.cabal` files based on the directory where you run the command from, not on where the file itself is.
Why does this matter? In a multi-package project, it's normal to have multiple packages with their own cabal files. You then can't run `stylish-haskell` from the root (or if you do, you'll get different behaviour). This makes things like `find . -name "*.hs" -exec stylish-haskell -i {} \;` or even `stylish-haskell -i -r .` a lot less useful.
(For anyone reading this: `find -execdir` runs the command in the directory of the file, which is a workaround for this problem.)
It would be nice if we instead looked for a cabal file for each argument file based on *its* location.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.