From ab4b685884ee2fef39deebe8d2fd53be9ba2997f Mon Sep 17 00:00:00 2001 From: Ross Lawley Date: Thu, 16 Feb 2023 09:57:46 +0000 Subject: [PATCH] Build: Update spotless and scalafmt versions --- .../scala/bson/codecs/macrocodecs/CaseClassCodec.scala | 8 ++++---- build.gradle | 2 +- config/scala/scalafmt.conf | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bson-scala/src/main/scala/org/mongodb/scala/bson/codecs/macrocodecs/CaseClassCodec.scala b/bson-scala/src/main/scala/org/mongodb/scala/bson/codecs/macrocodecs/CaseClassCodec.scala index dbe726c5c98..e8297498bf0 100644 --- a/bson-scala/src/main/scala/org/mongodb/scala/bson/codecs/macrocodecs/CaseClassCodec.scala +++ b/bson-scala/src/main/scala/org/mongodb/scala/bson/codecs/macrocodecs/CaseClassCodec.scala @@ -240,8 +240,8 @@ private[codecs] object CaseClassCodec { typeArgs += ($key -> { val tpeArgs = mutable.ListBuffer.empty[Class[_]] ..${flattenTypeArgs(f).map(t => - q"tpeArgs += classOf[${if (isCaseClass(t)) t.finalResultType else t.finalResultType.erasure}]" - )} + q"tpeArgs += classOf[${if (isCaseClass(t)) t.finalResultType else t.finalResultType.erasure}]" + )} tpeArgs.toList })""" }) @@ -292,8 +292,8 @@ private[codecs] object CaseClassCodec { val flattenedFieldTypes = fields.flatMap({ case (t, types) => types.map(f => f._2) :+ t }) val setClassToCaseClassMap = flattenedFieldTypes.map(t => q"""classToCaseClassMap ++= ${flattenTypeArgs(t).map(t => - q"(classOf[${t.finalResultType.erasure}], ${isCaseClass(t) || isCaseObject(t) || isSealed(t)})" - )}""" + q"(classOf[${t.finalResultType.erasure}], ${isCaseClass(t) || isCaseObject(t) || isSealed(t)})" + )}""" ) q""" diff --git a/build.gradle b/build.gradle index ff99a284e95..454c6084e6d 100644 --- a/build.gradle +++ b/build.gradle @@ -30,7 +30,7 @@ buildscript { // Scala plugins classpath "com.adtran:scala-multiversion-plugin:2.0.4" - classpath "com.diffplug.spotless:spotless-plugin-gradle:6.3.0" + classpath "com.diffplug.spotless:spotless-plugin-gradle:6.14.0" // Test logging plugin classpath 'com.adarshr:gradle-test-logger-plugin:2.1.0' diff --git a/config/scala/scalafmt.conf b/config/scala/scalafmt.conf index caba340d7f8..6c5e35eae69 100644 --- a/config/scala/scalafmt.conf +++ b/config/scala/scalafmt.conf @@ -1,4 +1,4 @@ -version = "3.4.3" +version = "3.7.1" runner.dialect = scala213 preset = default