Skip to content

Commit 3e6511e

Browse files
swsnrMasseGuillaume
authored andcommitted
Update scalafmt (#372)
* Update scalafmt to 0.5.4 * Reformat after scalafmt update * Update coursier as recommended by scalafmt
1 parent 3d66d76 commit 3e6511e

File tree

7 files changed

+66
-52
lines changed

7 files changed

+66
-52
lines changed

.scalafmt.conf

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
1+
project {
2+
git = true
3+
}
4+
5+
includeCurlyBraceInSelectChains = false
6+
optIn {
7+
breakChainOnFirstMethodDot = false
8+
}
9+
10+
style = default
111
maxColumn = 100
2-
project.git = true

build.sbt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import ScalaJSHelper._
22
import org.scalajs.sbtplugin.cross.CrossProject
33

4-
scalafmtConfig in ThisBuild := Some(file(".scalafmt"))
5-
64
lazy val akkaVersion = "2.4.11"
75
lazy val upickleVersion = "0.4.1"
86
lazy val scalatagsVersion = "0.6.1"
@@ -147,7 +145,6 @@ lazy val sbtScaladex = project
147145
"-Dplugin.version=" + version.value),
148146
scriptedBufferLog := false,
149147
bintrayRepository := "sbt-plugins",
150-
bintrayOrganization := None,
151-
scalafmt := {}
148+
bintrayOrganization := None
152149
)
153150
.enablePlugins(BintrayPlugin)

data/src/main/scala/ch.epfl.scala.index.data/elastic/SeedElasticSearch.scala

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,17 @@ class SeedElasticSearch(paths: DataPaths)(implicit val ec: ExecutionContext)
6464
)
6565

6666
println("creating index")
67-
Await.result(esClient.execute {
68-
create
69-
.index(indexName)
70-
.mappings(
71-
mapping(projectsCollection).fields(projectFields: _*),
72-
mapping(releasesCollection).fields(releasesFields: _*)
73-
)
74-
}, Duration.Inf)
67+
Await.result(
68+
esClient.execute {
69+
create
70+
.index(indexName)
71+
.mappings(
72+
mapping(projectsCollection).fields(projectFields: _*),
73+
mapping(releasesCollection).fields(releasesFields: _*)
74+
)
75+
},
76+
Duration.Inf
77+
)
7578

7679
println("loading update data")
7780
val projectConverter = new ProjectConvert(paths)

model/src/main/scala/ch.epfl.scala.index.model/License.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ object License {
6868
val TypesafeSubscriptionAgreement = License(
6969
"Typesafe Subscription Agreement",
7070
"Typesafe Subscription Agreement",
71-
Some("http://downloads.typesafe.com/website/legal/TypesafeSubscriptionAgreement.pdf"))
71+
Some("http://downloads.typesafe.com/website/legal/TypesafeSubscriptionAgreement.pdf")
72+
)
7273
val Unlicense = spdx("Unlicense", "The Unlicense")
7374
val W3C = spdx("W3C", "W3C Software Notice and License")
7475
val WTFPL = spdx("WTFPL", "Do What The F*ck You Want To Public License")

model/src/test/scala/ch.epfl.scala.index.model/release/DefaultReleaseTests.scala

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -50,35 +50,37 @@ object DefaultReleaseTests extends org.specs2.mutable.Specification {
5050
val organization = "typelevel"
5151
val repository = "cats"
5252
val groupdId = "org.typelevel"
53-
val releases = prepare(organization,
54-
repository,
55-
groupdId,
56-
List(
57-
("cats-core_2.11", "0.6.0"),
58-
("cats-core_2.11", "0.6.0-M2"),
59-
("cats-core_2.11", "0.6.0-M1"),
60-
("cats-core_2.11", "0.5.0"),
61-
("cats-core_2.11", "0.4.1"),
62-
("cats-core_2.11", "0.4.0"),
63-
("cats-core_2.10", "0.6.0"),
64-
("cats-core_2.10", "0.6.0-M2"),
65-
("cats-core_2.10", "0.6.0-M1"),
66-
("cats-core_2.10", "0.5.0"),
67-
("cats-core_2.10", "0.4.1"),
68-
("cats-core_2.10", "0.4.0"),
69-
("cats-core_sjs0.6_2.11", "0.6.0"),
70-
("cats-core_sjs0.6_2.11", "0.6.0-M2"),
71-
("cats-core_sjs0.6_2.11", "0.6.0-M1"),
72-
("cats-core_sjs0.6_2.11", "0.5.0"),
73-
("cats-core_sjs0.6_2.11", "0.4.1"),
74-
("cats-core_sjs0.6_2.11", "0.4.0"),
75-
("cats-core_sjs0.6_2.10", "0.6.0"),
76-
("cats-core_sjs0.6_2.10", "0.6.0-M2"),
77-
("cats-core_sjs0.6_2.10", "0.6.0-M1"),
78-
("cats-core_sjs0.6_2.10", "0.5.0"),
79-
("cats-core_sjs0.6_2.10", "0.4.1"),
80-
("cats-core_sjs0.6_2.10", "0.4.0")
81-
))
53+
val releases = prepare(
54+
organization,
55+
repository,
56+
groupdId,
57+
List(
58+
("cats-core_2.11", "0.6.0"),
59+
("cats-core_2.11", "0.6.0-M2"),
60+
("cats-core_2.11", "0.6.0-M1"),
61+
("cats-core_2.11", "0.5.0"),
62+
("cats-core_2.11", "0.4.1"),
63+
("cats-core_2.11", "0.4.0"),
64+
("cats-core_2.10", "0.6.0"),
65+
("cats-core_2.10", "0.6.0-M2"),
66+
("cats-core_2.10", "0.6.0-M1"),
67+
("cats-core_2.10", "0.5.0"),
68+
("cats-core_2.10", "0.4.1"),
69+
("cats-core_2.10", "0.4.0"),
70+
("cats-core_sjs0.6_2.11", "0.6.0"),
71+
("cats-core_sjs0.6_2.11", "0.6.0-M2"),
72+
("cats-core_sjs0.6_2.11", "0.6.0-M1"),
73+
("cats-core_sjs0.6_2.11", "0.5.0"),
74+
("cats-core_sjs0.6_2.11", "0.4.1"),
75+
("cats-core_sjs0.6_2.11", "0.4.0"),
76+
("cats-core_sjs0.6_2.10", "0.6.0"),
77+
("cats-core_sjs0.6_2.10", "0.6.0-M2"),
78+
("cats-core_sjs0.6_2.10", "0.6.0-M1"),
79+
("cats-core_sjs0.6_2.10", "0.5.0"),
80+
("cats-core_sjs0.6_2.10", "0.4.1"),
81+
("cats-core_sjs0.6_2.10", "0.4.0")
82+
)
83+
)
8284

8385
val result =
8486
DefaultRelease(repository, ReleaseSelection(None, None, None), releases, None, true)

project/plugins.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ addSbtPlugin("org.madoushi.sbt" % "sbt-sass" % "0.9.3")
55
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.1.1")
66
addSbtPlugin("me.lessis" % "bintray-sbt" % "0.3.0")
77
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.10")
8-
addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "0.2.11")
9-
addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.0.0-M14")
8+
addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "0.5.4")
9+
addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.0.0-M15-1")
1010

1111
libraryDependencies += "org.scala-sbt" % "scripted-plugin" % sbtVersion.value

server/src/main/scala/ch.epfl.scala.index.server/routes/Oauth2.scala

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@ class OAuth2(github: Github, session: GithubUserSession) {
2121
get {
2222
path("login") {
2323
headerValueByType[Referer]() { referer =>
24-
redirect(Uri("https://github.com/login/oauth/authorize").withQuery(
25-
Query(
26-
"client_id" -> github.clientId,
27-
"scope" -> "read:org",
28-
"state" -> referer.value
29-
)),
30-
TemporaryRedirect)
24+
redirect(
25+
Uri("https://github.com/login/oauth/authorize").withQuery(
26+
Query(
27+
"client_id" -> github.clientId,
28+
"scope" -> "read:org",
29+
"state" -> referer.value
30+
)),
31+
TemporaryRedirect
32+
)
3133
}
3234
} ~
3335
path("logout") {

0 commit comments

Comments
 (0)