Skip to content

Commit

Permalink
Upgrades scalafmt to version from master on scala2_11 branch
Browse files Browse the repository at this point in the history
This pr follows PR typelevel#3137
  • Loading branch information
jackcviers committed Nov 12, 2019
1 parent 42a2414 commit e5fa5d9
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=2.0.1
version=2.1.0
align.openParenCallSite = true
align.openParenDefnSite = true
maxColumn = 120
Expand Down
6 changes: 4 additions & 2 deletions core/src/main/scala/cats/data/NonEmptyList.scala
Original file line number Diff line number Diff line change
Expand Up @@ -511,8 +511,10 @@ sealed abstract private[data] class NonEmptyListInstances extends NonEmptyListIn

implicit val catsDataInstancesForNonEmptyList
: SemigroupK[NonEmptyList] with Bimonad[NonEmptyList] with NonEmptyTraverse[NonEmptyList] =
new NonEmptyReducible[NonEmptyList, List] with SemigroupK[NonEmptyList] with Bimonad[NonEmptyList]
with NonEmptyTraverse[NonEmptyList] {
new NonEmptyReducible[NonEmptyList, List]
with SemigroupK[NonEmptyList]
with Bimonad[NonEmptyList]
with NonEmptyTraverse[NonEmptyList] {

def combineK[A](a: NonEmptyList[A], b: NonEmptyList[A]): NonEmptyList[A] =
a.concatNel(b)
Expand Down
6 changes: 4 additions & 2 deletions core/src/main/scala/cats/data/NonEmptyVector.scala
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,10 @@ sealed abstract private[data] class NonEmptyVectorInstances {

implicit val catsDataInstancesForNonEmptyVector
: SemigroupK[NonEmptyVector] with Bimonad[NonEmptyVector] with NonEmptyTraverse[NonEmptyVector] =
new NonEmptyReducible[NonEmptyVector, Vector] with SemigroupK[NonEmptyVector] with Bimonad[NonEmptyVector]
with NonEmptyTraverse[NonEmptyVector] {
new NonEmptyReducible[NonEmptyVector, Vector]
with SemigroupK[NonEmptyVector]
with Bimonad[NonEmptyVector]
with NonEmptyTraverse[NonEmptyVector] {

def combineK[A](a: NonEmptyVector[A], b: NonEmptyVector[A]): NonEmptyVector[A] =
a.concatNev(b)
Expand Down
7 changes: 5 additions & 2 deletions core/src/main/scala/cats/instances/option.scala
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ trait OptionInstances extends cats.kernel.instances.OptionInstances {
with Alternative[Option]
with CommutativeMonad[Option]
with CoflatMap[Option] =
new Traverse[Option] with MonadError[Option, Unit] with Alternative[Option] with CommutativeMonad[Option]
with CoflatMap[Option] {
new Traverse[Option]
with MonadError[Option, Unit]
with Alternative[Option]
with CommutativeMonad[Option]
with CoflatMap[Option] {

def empty[A]: Option[A] = None

Expand Down
10 changes: 5 additions & 5 deletions laws/src/main/scala/cats/laws/discipline/MiniInt.scala
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ object MiniInt {

val allValues: List[MiniInt] = (minIntValue to maxIntValue).map(unsafeFromInt).toList

implicit val catsLawsEqInstancesForMiniInt: Order[MiniInt] with Hash[MiniInt] = new Order[MiniInt]
with Hash[MiniInt] {
def hash(x: MiniInt): Int = Hash[Int].hash(x.intBits)
implicit val catsLawsEqInstancesForMiniInt: Order[MiniInt] with Hash[MiniInt] =
new Order[MiniInt] with Hash[MiniInt] {
def hash(x: MiniInt): Int = Hash[Int].hash(x.intBits)

def compare(x: MiniInt, y: MiniInt): Int = Order[Int].compare(x.toInt, y.toInt)
}
def compare(x: MiniInt, y: MiniInt): Int = Order[Int].compare(x.toInt, y.toInt)
}

implicit val catsLawsExhaustiveCheckForMiniInt: ExhaustiveCheck[MiniInt] =
ExhaustiveCheck.instance(allValues)
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "0.6.1")
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "0.6.1")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.28")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.3.9")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.0.4")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.2.1")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.9.0")

/* Temporarily disabling sbt-hydra, see #2870.
Expand Down

0 comments on commit e5fa5d9

Please sign in to comment.