Permalink
Browse files

Fix Scalastyle

  • Loading branch information...
travisbrown committed Dec 30, 2015
1 parent 052b4ba commit f9f7e1bdbd17c745281417cf27e14eda0074ea9c
Showing with 18 additions and 21 deletions.
  1. +3 −3 build.sbt
  2. 0 core/{shared → }/src/main/scala/io/iteratee/Enumeratee.scala
  3. 0 core/{shared → }/src/main/scala/io/iteratee/EnumerateeInstances.scala
  4. 0 core/{shared → }/src/main/scala/io/iteratee/EnumerateeModule.scala
  5. +3 −3 core/{shared → }/src/main/scala/io/iteratee/Enumerator.scala
  6. 0 core/{shared → }/src/main/scala/io/iteratee/EnumeratorInstances.scala
  7. 0 core/{shared → }/src/main/scala/io/iteratee/EnumeratorModule.scala
  8. +1 −1 core/{shared → }/src/main/scala/io/iteratee/Iteratee.scala
  9. +9 −12 core/{shared → }/src/main/scala/io/iteratee/IterateeInstances.scala
  10. 0 core/{shared → }/src/main/scala/io/iteratee/IterateeModule.scala
  11. 0 core/{shared → }/src/main/scala/io/iteratee/Module.scala
  12. 0 core/{shared → }/src/main/scala/io/iteratee/internal/Input.scala
  13. 0 core/{shared → }/src/main/scala/io/iteratee/internal/InputInstances.scala
  14. 0 core/{shared → }/src/main/scala/io/iteratee/internal/Step.scala
  15. 0 core/{shared → }/src/main/scala/io/iteratee/internal/StepFolders.scala
  16. 0 core/{shared → }/src/main/scala/io/iteratee/internal/StepInputFolders.scala
  17. 0 core/{shared → }/src/main/scala/io/iteratee/internal/package.scala
  18. 0 core/{shared → }/src/main/scala/io/iteratee/package.scala
  19. 0 core/{shared → }/src/test/scala/io/iteratee/ArbitraryEnumerators.scala
  20. 0 core/{shared → }/src/test/scala/io/iteratee/ArbitraryInstances.scala
  21. 0 core/{shared → }/src/test/scala/io/iteratee/BaseSuite.scala
  22. 0 core/{shared → }/src/test/scala/io/iteratee/EnumerateeSuite.scala
  23. 0 core/{shared → }/src/test/scala/io/iteratee/EnumeratorSuite.scala
  24. 0 core/{shared → }/src/test/scala/io/iteratee/EqInstances.scala
  25. 0 core/{shared → }/src/test/scala/io/iteratee/InputSuite.scala
  26. 0 core/{shared → }/src/test/scala/io/iteratee/IterateeSuite.scala
  27. 0 core/{shared → }/src/test/scala/io/iteratee/package.scala
  28. +1 −1 project/plugins.sbt
  29. +1 −1 scalastyle-config.xml
@@ -46,9 +46,9 @@ lazy val baseSettings = Seq(
case Some((2, 10)) => false
case _ => true
}
)
),
(scalastyleSources in Compile) <++= sourceDirectories in Compile
)
lazy val allSettings = buildSettings ++ baseSettings ++ publishSettings
lazy val commonJsSettings = Seq(
@@ -71,7 +71,7 @@ lazy val root = project.in(file("."))
.aggregate(core, coreJS, task)
.dependsOn(core)
lazy val coreBase = crossProject.in(file("core"))
lazy val coreBase = crossProject.crossType(CrossType.Pure).in(file("core"))
.settings(
moduleName := "iteratee-core",
name := "core",
@@ -18,6 +18,9 @@ abstract class Enumerator[F[_], E] extends Serializable { self =>
final def map[B](f: E => B)(implicit F: Monad[F]): Enumerator[F, B] = mapE(Enumeratee.map(f))
final def flatMap[B](f: E => Enumerator[F, B])(implicit F: Monad[F]): Enumerator[F, B] =
mapE(Enumeratee.flatMap(f))
final def prepend(e: E)(implicit F: Monad[F]): Enumerator[F, E] = {
new Enumerator[F, E] {
def apply[A](s: Step[F, E, A]): F[Step[F, E, A]] = F.flatMap(
@@ -36,9 +39,6 @@ abstract class Enumerator[F[_], E] extends Serializable { self =>
final def apply[A](s: Step[F, E, A]): F[Step[F, E, A]] = F.flatMap(self(s))(e2(_))
}
final def flatMap[B](f: E => Enumerator[F, B])(implicit F: Monad[F]) =
mapE(Enumeratee.flatMap(f))
final def flatten[B](implicit M: Monad[F], ev: E =:= F[B]): Enumerator[F, B] =
flatMap(e => Enumerator.liftM(ev(e)))
@@ -202,7 +202,7 @@ final object Iteratee extends IterateeInstances {
*
* @group Utilities
*/
final def fail[F[_], T, E, A](e: T)(implicit F: MonadError[F, T]): Iteratee[F, E, A] = Iteratee.liftM(F.raiseError[A](e))
final def fail[F[_], T, E, A](e: T)(implicit F: MonadError[F, T]): Iteratee[F, E, A] = liftM(F.raiseError[A](e))
/**
* An iteratee that reads nothing from a stream.
@@ -5,22 +5,19 @@ import cats.functor.Contravariant
import io.iteratee.internal.{ Input, Step }
private[iteratee] trait IterateeInstances extends IterateeInstances0 {
implicit final def iterateeContravariant[F[_]: Monad, A]: Contravariant[
({ type L[x] = Iteratee[F, x, A] })#L
] = new Contravariant[({ type L[x] = Iteratee[F, x, A] })#L] {
def contramap[E, E2](r: Iteratee[F, E, A])(f: E2 => E) = r.contramap(f)
}
implicit final def iterateeContravariant[F[_]: Monad, A]: Contravariant[({ type L[x] = Iteratee[F, x, A] })#L] =
new Contravariant[({ type L[x] = Iteratee[F, x, A] })#L] {
def contramap[E, E2](r: Iteratee[F, E, A])(f: E2 => E) = r.contramap(f)
}
implicit final def iterateeMonadError[F[_], T, E](implicit F: MonadError[F, T]): MonadError[
({ type L[x] = Iteratee[F, E, x] })#L,
T
] = new IterateeMonadError[F, T, E](F)
implicit final def iterateeMonadError[F[_], T, E]
(implicit F: MonadError[F, T]): MonadError[({ type L[x] = Iteratee[F, E, x] })#L, T] =
new IterateeMonadError[F, T, E](F)
}
private[iteratee] trait IterateeInstances0 {
implicit final def iterateeMonad[F[_], E](implicit F: Monad[F]): Monad[
({ type L[x] = Iteratee[F, E, x] })#L
] = new IterateeMonad[F, E](F)
implicit final def iterateeMonad[F[_], E](implicit F: Monad[F]): Monad[({ type L[x] = Iteratee[F, E, x] })#L] =
new IterateeMonad[F, E](F)
}
private class IterateeMonad[F[_], E](F: Monad[F]) extends Monad[({ type L[x] = Iteratee[F, E, x] })#L] {
@@ -15,7 +15,7 @@ addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.5.3")
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "0.8.4")
addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "0.8.1")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.5")
addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "0.7.0")
addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "0.8.0")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.2.0")
addSbtPlugin("org.brianmckenna" % "sbt-wartremover" % "0.13")
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.2.2")
@@ -14,7 +14,7 @@
</check>
<check level="error" class="org.scalastyle.file.FileLineLengthChecker" enabled="true">
<parameters>
<parameter name="maxLineLength"><![CDATA[100]]></parameter>
<parameter name="maxLineLength"><![CDATA[120]]></parameter>
</parameters>
</check>
<check level="error" class="org.scalastyle.file.WhitespaceEndOfLineChecker" enabled="true"></check>

0 comments on commit f9f7e1b

Please sign in to comment.