cvogt / cbt

CBT - fun, fast, intuitive, compositional, statically checked builds written in Scala
Other
488 stars 60 forks source link

Scalafmt - .scalafmt.conf lookup #576

Closed mfolnovic closed 6 years ago

mfolnovic commented 6 years ago

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.

Code by @cvogt on Gitter: https://gitter.im/cvogt/cbt?at=5a41021f0163b0281078c1a5

CLAassistant commented 6 years ago

CLA assistant check
All committers have signed the CLA.

cvogt commented 6 years ago

Love it!