diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index 648a6ee..85b2fc8 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -9,3 +9,6 @@ bf8eae770fdbfdf7d916e38003c3f6c9ec8a4ec6 # Scala Steward: Reformat with scalafmt 3.8.5 aae99098fae4a59fed75ecb5e71db3af96de4a07 + +# Scala Steward: Reformat with scalafmt 3.9.7 +535f319d144ddfaf77dcd73a0d5be472803a3933 diff --git a/.scalafmt.conf b/.scalafmt.conf index b174f52..386bae4 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,7 +1,7 @@ # initial version taken over from alpakka # https://akka.io/blog/2019/09/09/akka-family-builds -version = 3.9.6 +version = 3.9.7 runner.dialect = "scala213" style = defaultWithAlign diff --git a/build.sbt b/build.sbt index 3c6961e..970d3bd 100644 --- a/build.sbt +++ b/build.sbt @@ -41,7 +41,7 @@ lazy val nettyExclusions = Seq( ThisBuild / organization := "io.waylay" ThisBuild / homepage := Some(url("https://waylay.io")) -ThisBuild / developers := List( +ThisBuild / developers := List( Developer( "ramazanyich", "Ramil Israfilov", diff --git a/project/plugins.sbt b/project/plugins.sbt index df723c4..137fbaf 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,8 +1,8 @@ resolvers += "jgit-repo" at "https://download.eclipse.org/jgit/maven" -addSbtPlugin("com.github.sbt" % "sbt-site" % "1.6.0") -addSbtPlugin("com.github.sbt" % "sbt-release" % "1.4.0") -addSbtPlugin("com.github.sbt" % "sbt-ghpages" % "0.7.0") +addSbtPlugin("com.github.sbt" % "sbt-site" % "1.6.0") +addSbtPlugin("com.github.sbt" % "sbt-release" % "1.4.0") +addSbtPlugin("com.github.sbt" % "sbt-ghpages" % "0.7.0") addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.11.0") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.4") -addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.12.2") +addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.12.2") diff --git a/src/it/scala/io/waylay/influxdb/InfluxDB2Spec.scala b/src/it/scala/io/waylay/influxdb/InfluxDB2Spec.scala index 93f0073..da74316 100644 --- a/src/it/scala/io/waylay/influxdb/InfluxDB2Spec.scala +++ b/src/it/scala/io/waylay/influxdb/InfluxDB2Spec.scala @@ -18,7 +18,7 @@ class InfluxDB2Spec(implicit ee: ExecutionEnv) extends Specification with Integr "then influxdb2 client" should { "create bucket with retention" in { - val bucket = "testdb2.io" + val bucket = "testdb2.io" val influxClient = new InfluxDB2(wsClient, host, org, token, mappedInfluxPort, defaultRetention = "4w") Await.result(influxClient.createBucket(bucket), 5.seconds) diff --git a/src/main/scala/io/waylay/influxdb/WriteProtocol.scala b/src/main/scala/io/waylay/influxdb/WriteProtocol.scala index 1004afc..3383ae5 100644 --- a/src/main/scala/io/waylay/influxdb/WriteProtocol.scala +++ b/src/main/scala/io/waylay/influxdb/WriteProtocol.scala @@ -31,7 +31,7 @@ private[influxdb] object WriteProtocol extends SharedProtocol { val lines = points.map { point => val measurementName = escapeTag(point.measurementName) - val tags = point.tags + val tags = point.tags .map { case (key, value) => "," + escapeTag(key) + "=" + escapeTag(value) } diff --git a/src/main/scala/io/waylay/influxdb/query/InfluxQueryBuilder.scala b/src/main/scala/io/waylay/influxdb/query/InfluxQueryBuilder.scala index fd1f889..7578767 100644 --- a/src/main/scala/io/waylay/influxdb/query/InfluxQueryBuilder.scala +++ b/src/main/scala/io/waylay/influxdb/query/InfluxQueryBuilder.scala @@ -157,9 +157,9 @@ object InfluxQueryBuilder extends SharedProtocol { private def instantToWhereExpression(interval: Interval): Option[String] = interval match { - case Interval(None, None) => None - case Interval(Some(start), None) => Some("time >= " + instantToExpression(start)) - case Interval(None, Some(end)) => Some("time < " + instantToExpression(end)) + case Interval(None, None) => None + case Interval(Some(start), None) => Some("time >= " + instantToExpression(start)) + case Interval(None, Some(end)) => Some("time < " + instantToExpression(end)) case Interval(Some(start), Some(end)) => Some("time >= " + instantToExpression(start) + " AND time < " + instantToExpression(end)) } @@ -229,9 +229,9 @@ object InfluxQueryBuilder extends SharedProtocol { def fromJava(start: Option[java.time.Instant], end: Option[java.time.Instant]): Interval = Interval(start.map(Exact), end.map(Exact)) - def from(start: Instant): Interval = Interval(Some(Exact(start)), None) - def fromUntil(start: Instant, end: Instant): Interval = Interval(Some(Exact(start)), Some(Exact(end))) - def relativeToNow(timeToGoBack: Duration): Interval = Interval(Some(RelativeTo(Now, timeToGoBack)), None) + def from(start: Instant): Interval = Interval(Some(Exact(start)), None) + def fromUntil(start: Instant, end: Instant): Interval = Interval(Some(Exact(start)), Some(Exact(end))) + def relativeToNow(timeToGoBack: Duration): Interval = Interval(Some(RelativeTo(Now, timeToGoBack)), None) def relativeTo(timeToGoBack: Duration, to: Instant): Interval = Interval(Some(RelativeTo(Exact(to), timeToGoBack)), None) }