Skip to content

Commit 0bdb704

Browse files
authored
Add formatter configuration (#11)
1 parent 2cfd90b commit 0bdb704

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

app/utils/ReaderT.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import scala.language.higherKinds
55
import cats.{Applicative, Functor, Monad}
66

77
/**
8-
* @param F the structure we add to our stack
9-
*/
8+
* @param F the structure we add to our stack
9+
*/
1010
case class ReaderT[F[_], A, B](f: A => F[B]) {
1111
def map[C](g: B => C)(implicit F: Functor[F]): ReaderT[F, A, C] =
1212
ReaderT(a => F.map(f(a))(g))

app/wiring/AppLoader.scala

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,13 @@ class AppComponents(context: Context)
3434
}
3535
}
3636

37-
case GET(p"/sqrt/${double(num)}") => Action.async {
38-
val query = Query(implicit c =>
39-
SQL"select sqrt($num) as result".as(SqlParser.int("result").single))
37+
case GET(p"/sqrt/${double(num)}") =>
38+
Action.async {
39+
val query = Query(implicit c =>
40+
SQL"select sqrt($num) as result".as(SqlParser.int("result").single))
4041

41-
queryRunner.run(query).map(r => Ok(r.toString))
42-
}
42+
queryRunner.run(query).map(r => Ok(r.toString))
43+
}
4344
}
4445
}
4546

build.sbt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,6 @@ scalacOptions in (Test, compile) ~= (_.filterNot(
5151
)))
5252

5353
scalafmtOnCompile := true
54+
scalafmtConfig := file("project/scalafmt.conf")
5455

5556
wartremoverErrors in (Compile, compile) ++= Warts.unsafe

project/scalafmt.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
docstrings = JavaDoc

0 commit comments

Comments
 (0)