Skip to content

Commit

Permalink
Also search in current workding dir for .scalafmt.conf (#2720)
Browse files Browse the repository at this point in the history
Pull request: #2720
  • Loading branch information
lefou authored Sep 1, 2023
1 parent d1a5dd8 commit a2a8c86
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scalalib/src/mill/scalalib/scalafmt/ScalafmtModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ trait ScalafmtModule extends JavaModule {
)
}

def scalafmtConfig: T[Seq[PathRef]] = T.sources(T.workspace / ".scalafmt.conf")
def scalafmtConfig: T[Seq[PathRef]] = T.sources(
T.workspace / ".scalafmt.conf",
os.pwd / ".scalafmt.conf"
)

// TODO: Do we want provide some defaults or write a default file?
private[ScalafmtModule] def resolvedScalafmtConfig: Task[PathRef] = T.task {
Expand Down

0 comments on commit a2a8c86

Please sign in to comment.