ennocramer / floskell

Floskell is a flexible Haskell source code pretty printer.
BSD 3-Clause "New" or "Revised" License
178 stars 22 forks source link

Expose findConfigIn #2

Closed AlexeyRaga closed 5 years ago

AlexeyRaga commented 5 years ago

Before this change, floskell could find config file only from the current directory and up.

However, when used as a library, current directory is not necessarily a directory where the config file is located.

For example, in a multi-project environment, floskell.json can be located in a specific project directory while the current directory will be one level up.

The same applies when projects are included as git submodules.

This change allows floskell to find a config file that is closest to the file that is being handled. With this method external tools (such as HIE) would be able to provide floskell with a starting point when searching for the config.

ennocramer commented 5 years ago

Thanks again for the contribution!