From 0b96865ed8183cb7e6f8ac6d184e941a26308df5 Mon Sep 17 00:00:00 2001 From: vlad Date: Tue, 19 Jul 2016 00:44:35 -0400 Subject: Scalastyle in compile --- src/main/scala/com/drivergrp/core/app.scala | 20 ++++++++++---------- src/main/scala/com/drivergrp/core/rest.scala | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'src/main/scala/com') diff --git a/src/main/scala/com/drivergrp/core/app.scala b/src/main/scala/com/drivergrp/core/app.scala index 488fdd3..13663ab 100644 --- a/src/main/scala/com/drivergrp/core/app.scala +++ b/src/main/scala/com/drivergrp/core/app.scala @@ -6,11 +6,11 @@ import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport import akka.http.scaladsl.model.StatusCodes import akka.http.scaladsl.server.Directives._ import akka.http.scaladsl.server.RouteResult._ -import akka.http.scaladsl.server.{ Route, RouteConcatenation } +import akka.http.scaladsl.server.{Route, RouteConcatenation} import akka.stream.ActorMaterializer -import com.drivergrp.core.logging.{ Logger, TypesafeScalaLogger } +import com.drivergrp.core.logging.{Logger, TypesafeScalaLogger} import com.drivergrp.core.rest.Swagger -import com.drivergrp.core.time.provider.{ SystemTimeProvider, TimeProvider } +import com.drivergrp.core.time.provider.{SystemTimeProvider, TimeProvider} import com.typesafe.config.Config import org.slf4j.LoggerFactory import spray.json.DefaultJsonProtocol @@ -39,7 +39,7 @@ object app { activateServices(modules) scheduleServicesDeactivation(modules) bindHttp(modules) - Console.print(s"${ this.getClass.getName } App is started") + Console.print(s"${this.getClass.getName} App is started") } def stop() = { @@ -47,11 +47,11 @@ object app { val _ = actorSystem.terminate() val terminated = Await.result(actorSystem.whenTerminated, 30.seconds) val addressTerminated = if (terminated.addressTerminated) "is" else "is not" - Console.print(s"${ this.getClass.getName } App $addressTerminated stopped ") + Console.print(s"${this.getClass.getName} App $addressTerminated stopped ") } } - protected def bindHttp(modules: Seq[Module]) { + protected def bindHttp(modules: Seq[Module]): Unit = { import SprayJsonSupport._ import DefaultJsonProtocol._ @@ -80,12 +80,12 @@ object app { */ protected def activateServices(services: Seq[Module]) = { services.foreach { service => - Console.print(s"Service ${ service.name } starts ...") + Console.print(s"Service ${service.name} starts ...") try { service.activate() } catch { case t: Throwable => - log.fatal(s"Service ${ service.name } failed to activate", t) + log.fatal(s"Service ${service.name} failed to activate", t) Console.print(" Failed! (check log)") } Console.println(" Done") @@ -99,12 +99,12 @@ object app { Runtime.getRuntime.addShutdownHook(new Thread() { override def run(): Unit = { services.foreach { service => - Console.print(s"Service ${ service.name } shutting down ...") + Console.print(s"Service ${service.name} shutting down ...") try { service.deactivate() } catch { case t: Throwable => - log.fatal(s"Service ${ service.name } failed to deactivate", t) + log.fatal(s"Service ${service.name} failed to deactivate", t) Console.print(" Failed! (check log)") } Console.println(" Done") diff --git a/src/main/scala/com/drivergrp/core/rest.scala b/src/main/scala/com/drivergrp/core/rest.scala index 0f730ba..adbf716 100644 --- a/src/main/scala/com/drivergrp/core/rest.scala +++ b/src/main/scala/com/drivergrp/core/rest.scala @@ -138,7 +138,7 @@ object rest { val materializer = ActorMaterializer()(actorSystem) - override val host = "localhost:8080" //the url of your api, not swagger's json endpoint + override val host = "localhost:8080" // the url of your api, not swagger's json endpoint override val basePath = config.getString("swagger.basePath") override val apiDocsPath = config.getString("swagger.docsPath") -- cgit v1.2.3