diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 0000000..7d0def7 --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,2 @@ +# Scala Steward: Reformat with scalafmt 3.7.10 +6b554b7d7f25ed6f5a00329be1d0368b36920061 diff --git a/.scalafmt.conf b/.scalafmt.conf index bcbec6e..57004be 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,5 +1,5 @@ runner.dialect = "scala213" -version = 3.7.3 +version = 3.7.10 binPack.parentConstructors = true maxColumn = 128 includeCurlyBraceInSelectChains = false diff --git a/src/main/g8/.scalafmt.conf b/src/main/g8/.scalafmt.conf index bcbec6e..57004be 100644 --- a/src/main/g8/.scalafmt.conf +++ b/src/main/g8/.scalafmt.conf @@ -1,5 +1,5 @@ runner.dialect = "scala213" -version = 3.7.3 +version = 3.7.10 binPack.parentConstructors = true maxColumn = 128 includeCurlyBraceInSelectChains = false diff --git a/src/main/g8/build.sbt b/src/main/g8/build.sbt index 077f143..869af86 100644 --- a/src/main/g8/build.sbt +++ b/src/main/g8/build.sbt @@ -16,28 +16,28 @@ lazy val root = (project in file(".")) libraryDependencies ++= gelf, libraryDependencies ++= gatlingPicatinny, libraryDependencies ++= janino, - $if(amqpPlugin.truthy)$ - libraryDependencies ++= amqpPlugin, + $if(amqpPlugin.truthy) $ + libraryDependencies ++= amqpPlugin, $endif$ - $if(kafkaPlugin.truthy)$ - libraryDependencies ++= kafkaPlugin, + $if (kafkaPlugin.truthy) $ + libraryDependencies ++= kafkaPlugin, libraryDependencies ++= kafkaSerializer, libraryDependencies ++= avro4s, $endif$ - $if(jdbcPlugin.truthy)$ - libraryDependencies ++= jdbcPlugin, + $if (jdbcPlugin.truthy) $ + libraryDependencies ++= jdbcPlugin, libraryDependencies ++= postgresJdbc, $endif$ - scalacOptions ++= Seq( - "-encoding", - "UTF-8", - "-Xfatal-warnings", - "-deprecation", - "-feature", - "-unchecked", - "-language:implicitConversions", - "-language:higherKinds", - "-language:existentials", - "-language:postfixOps", - ), + scalacOptions ++= Seq ( + "-encoding", + "UTF-8", + "-Xfatal-warnings", + "-deprecation", + "-feature", + "-unchecked", + "-language:implicitConversions", + "-language:higherKinds", + "-language:existentials", + "-language:postfixOps" + ), ) diff --git a/src/main/g8/project/Dependencies.scala b/src/main/g8/project/Dependencies.scala index 05864fb..1634978 100644 --- a/src/main/g8/project/Dependencies.scala +++ b/src/main/g8/project/Dependencies.scala @@ -9,15 +9,15 @@ object Dependencies { lazy val gelf: Seq[ModuleID] = Seq("de.siegmar" % "logback-gelf" % "4.0.2") lazy val gatlingPicatinny: Seq[ModuleID] = Seq("ru.tinkoff" %% "gatling-picatinny" % "$gatling_picatinny_version$") lazy val janino: Seq[ModuleID] = Seq("org.codehaus.janino" % "janino" % "3.1.8") - $if(amqpPlugin.truthy)$ + $if(amqpPlugin.truthy) $ lazy val amqpPlugin: Seq[ModuleID] = Seq("ru.tinkoff" %% "gatling-amqp-plugin" % "0.8.0") $endif$ - $if(kafkaPlugin.truthy)$ + $if(kafkaPlugin.truthy) $ lazy val kafkaPlugin: Seq[ModuleID] = Seq("ru.tinkoff" %% "gatling-kafka-plugin" % "0.9.0") lazy val kafkaSerializer: Seq[ModuleID] = Seq("io.confluent" % "kafka-avro-serializer" % "5.3.0") lazy val avro4s: Seq[ModuleID] = Seq("com.sksamuel.avro4s" %% "avro4s-core" % "4.0.4") $endif$ - $if(jdbcPlugin.truthy)$ + $if(jdbcPlugin.truthy) $ lazy val jdbcPlugin: Seq[ModuleID] = Seq("ru.tinkoff" %% "gatling-jdbc-plugin" % "0.7.0") lazy val postgresJdbc: Seq[ModuleID] = Seq("org.postgresql" % "postgresql" % "42.3.3") $endif$ diff --git a/src/main/g8/project/plugins.sbt b/src/main/g8/project/plugins.sbt index db5941f..34300dd 100644 --- a/src/main/g8/project/plugins.sbt +++ b/src/main/g8/project/plugins.sbt @@ -1,3 +1,2 @@ -addSbtPlugin("io.gatling" % "gatling-sbt" % "$sbt_gatling_version$") -addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "$sbt_scalafmt_version$") - +addSbtPlugin("io.gatling" % "gatling-sbt" % "$sbt_gatling_version$") +addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "$sbt_scalafmt_version$") diff --git a/src/main/g8/src/test/scala/$package$/$name__word$/$name__word$.scala b/src/main/g8/src/test/scala/$package$/$name__word$/$name__word$.scala index 763ef38..a9ac6a4 100644 --- a/src/main/g8/src/test/scala/$package$/$name__word$/$name__word$.scala +++ b/src/main/g8/src/test/scala/$package$/$name__word$/$name__word$.scala @@ -2,28 +2,29 @@ package $package$ import io.gatling.core.Predef._ import io.gatling.http.Predef._ -$if(kafkaPlugin.truthy)$ +$if(kafkaPlugin.truthy) $ import org.apache.kafka.clients.producer.ProducerConfig $endif$ -$if(amqpPlugin.truthy)$ +$if(amqpPlugin.truthy) $ import ru.tinkoff.gatling.amqp.Predef._ import ru.tinkoff.gatling.amqp.protocol.AmqpProtocolBuilder $endif$ import ru.tinkoff.gatling.config.SimulationConfig._ -$if(kafkaPlugin.truthy)$ +$if(kafkaPlugin.truthy) $ import ru.tinkoff.gatling.kafka.Predef.kafka import ru.tinkoff.gatling.kafka.protocol.KafkaProtocolBuilder $endif$ -$if(jdbcPlugin.truthy)$ +$if(jdbcPlugin.truthy) $ import ru.tinkoff.load.jdbc.Predef._ import ru.tinkoff.load.jdbc.protocol.JdbcProtocolBuilder import scala.concurrent.duration.DurationInt $endif$ -package object $name;format="word"$ { +package object $name; +format = "word" $ { - $if(http.truthy)$ + $if(http.truthy) $ // common http protocol params (eg headers, checks) val httpProtocol = http .baseUrl( @@ -36,7 +37,7 @@ package object $name;format="word"$ { .disableFollowRedirect $endif$ - $if(jdbcPlugin.truthy)$ + $if(jdbcPlugin.truthy) $ val jdbcProtocol: JdbcProtocolBuilder = DB .url(getStringParam("dbUrl")) .username(getStringParam("dbUser")) @@ -44,7 +45,7 @@ package object $name;format="word"$ { .connectionTimeout(2.minute) $endif$ - $if(amqpPlugin.truthy)$ + $if(amqpPlugin.truthy) $ val amqpHost: String = getStringParam("amqpHost") val amqpPort: Int = getIntParam("amqpPort") val amqpLogin: String = getStringParam("amqpLogin") @@ -63,7 +64,7 @@ package object $name;format="word"$ { .consumerThreadsCount(8) .usePersistentDeliveryMode $endif$ - $if(kafkaPlugin.truthy)$ + $if(kafkaPlugin.truthy) $ val kafkaProtocol: KafkaProtocolBuilder = kafka .topic("myTopic") .properties( diff --git a/src/main/g8/src/test/scala/$package$/$name__word$/GatlingRunner.scala b/src/main/g8/src/test/scala/$package$/$name__word$/GatlingRunner.scala index 8e2b78e..973ace9 100644 --- a/src/main/g8/src/test/scala/$package$/$name__word$/GatlingRunner.scala +++ b/src/main/g8/src/test/scala/$package$/$name__word$/GatlingRunner.scala @@ -1,4 +1,4 @@ -package $package$.$name;format="word"$ +package $package$.$name; format = "word" $ import io.gatling.app.Gatling import io.gatling.core.config.GatlingPropertiesBuilder