Currently, scalafmt only searches for .scalafmt.conf in projectDirectory. This doesn't work well for multi-module projects where there's only one .scalafmt.conf in root directory.
This PR changes search logic so that it first searches for .scalafmt.conf in all parent directories (not just projectDirectory), then fallbacks to home directory, and then fallbacks to default config.
Currently,
scalafmt
only searches for.scalafmt.conf
inprojectDirectory
. This doesn't work well for multi-module projects where there's only one.scalafmt.conf
in root directory.This PR changes search logic so that it first searches for .scalafmt.conf in all parent directories (not just
projectDirectory
), then fallbacks to home directory, and then fallbacks to default config.Code by @cvogt on Gitter: https://gitter.im/cvogt/cbt?at=5a41021f0163b0281078c1a5