diff --git a/.github/workflows/scala.yml b/.github/workflows/scala.yml index fd493a93e..c833ee9d3 100644 --- a/.github/workflows/scala.yml +++ b/.github/workflows/scala.yml @@ -143,7 +143,7 @@ jobs: # run: sbt test run: | cat /dev/null | sbt -Dsbt.log.noformat=true ++2.13 dependencyLockCheck - cat /dev/null | sbt -Dsbt.log.noformat=true -J-Xmx2G -J-XX:+UseG1GC ++2.13 scalastyle test:scalastyle scalafmtCheck coverage test coverageReport + cat /dev/null | sbt -Dsbt.log.noformat=true -J-Xmx2G -J-XX:+UseG1GC ++2.13 scalafmtCheck coverage test coverageReport - name: Upload test coverage report uses: codecov/codecov-action@v3 diff --git a/build.sbt b/build.sbt index a6d8936a7..a252795e3 100644 --- a/build.sbt +++ b/build.sbt @@ -193,16 +193,6 @@ scalacOptions --= (CrossVersion.partialVersion(scalaVersion.value) match { List.empty[String] }) -scalastyleFailOnWarning := true - -lazy val mainScalastyle = taskKey[Unit]("mainScalastyle") -lazy val testScalastyle = taskKey[Unit]("testScalastyle") - -mainScalastyle := (Compile / scalastyle).toTask("").value -testScalastyle := (Test / scalastyle).toTask("").value - -Test / test := (Test / test).dependsOn(testScalastyle).value -Test / test := (Test / test).dependsOn(mainScalastyle).value Test / testOptions += Tests.Argument(TestFrameworks.ScalaTest, "-oD") // Scala 2.11 doesn't support mixed projects as ours, so just disable docs for that release. diff --git a/project/plugins.sbt b/project/plugins.sbt index 25b779ba1..89e2a8f8a 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -4,7 +4,6 @@ addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.10.0") addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.2-1") addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.4.4") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") -addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.0") addSbtPlugin("au.com.onegeek" %% "sbt-dotenv" % "2.1.233") addSbtPlugin("org.wartremover" % "sbt-wartremover" % "3.0.6") diff --git a/scalastyle-config.xml b/scalastyle-config.xml deleted file mode 100644 index 99aaf9586..000000000 --- a/scalastyle-config.xml +++ /dev/null @@ -1,93 +0,0 @@ - - Scalastyle standard configuration - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/main/scala/com/cognite/sdk/scala/common/OAuth2.scala b/src/main/scala/com/cognite/sdk/scala/common/OAuth2.scala index a103de52c..e3867fcba 100644 --- a/src/main/scala/com/cognite/sdk/scala/common/OAuth2.scala +++ b/src/main/scala/com/cognite/sdk/scala/common/OAuth2.scala @@ -156,7 +156,6 @@ object OAuth2 { def getAuth: F[Auth] = commonGetAuth(cache, refreshSecondsBeforeExpiration) } - // scalastyle:off method.length object ClientCredentialsProvider { def apply[F[_]]( credentials: ClientCredentials, @@ -169,7 +168,6 @@ object OAuth2 { ConcurrentCachedObject(credentials.getAuth, initialToken) .map(new ClientCredentialsProvider[F](_, refreshSecondsBeforeExpiration)) } - // scalastyle:on method.length object SessionProvider { def apply[F[_]]( diff --git a/src/main/scala/com/cognite/sdk/scala/common/dataTypes.scala b/src/main/scala/com/cognite/sdk/scala/common/dataTypes.scala index e3e41f61f..196d9ecd3 100644 --- a/src/main/scala/com/cognite/sdk/scala/common/dataTypes.scala +++ b/src/main/scala/com/cognite/sdk/scala/common/dataTypes.scala @@ -11,7 +11,7 @@ import io.circe.generic.semiauto.{deriveDecoder, deriveEncoder} import sttp.model.Uri import scala.annotation.nowarn -// scalastyle:off number.of.types + trait ResponseWithCursor { val nextCursor: Option[String] } @@ -237,16 +237,16 @@ object Setter { @SuppressWarnings(Array("org.wartremover.warts.Null")) def fromOption[T](option: Option[T]): Option[Setter[T]] = option match { - case null => Some(SetNull()) // scalastyle:ignore null + case null => Some(SetNull()) case None => None - case Some(null) => Some(SetNull()) // scalastyle:ignore null + case Some(null) => Some(SetNull()) case Some(value) => Some(SetValue(value)) } @SuppressWarnings(Array("org.wartremover.warts.Null")) def fromAny[T](optionValue: T): Option[Setter[T]] = optionValue match { - case null => Some(SetNull()) // scalastyle:ignore null + case null => Some(SetNull()) case value => Some(SetValue(value)) } @@ -270,7 +270,7 @@ object NonNullableSetter { case None => None case Some(value) => require( - value != null, // scalastyle:ignore null + value != null, "Invalid null value for non-nullable field update" ) Some(SetValue(value)) diff --git a/src/main/scala/com/cognite/sdk/scala/common/filter.scala b/src/main/scala/com/cognite/sdk/scala/common/filter.scala index 3584b814f..c9b0e6ff5 100644 --- a/src/main/scala/com/cognite/sdk/scala/common/filter.scala +++ b/src/main/scala/com/cognite/sdk/scala/common/filter.scala @@ -85,7 +85,6 @@ trait PartitionedFilter[R, Fi, F[_]] extends PartitionedFilterF[R, Fi, F] { } object Filter { - // scalastyle:off parameter.number def filterWithCursor[F[_], R, Fi]( requestSession: RequestSession[F], filterUrl: Uri, @@ -115,5 +114,4 @@ object Filter { value => value ) } - // scalastyle:off parameter.number } diff --git a/src/main/scala/com/cognite/sdk/scala/v1/Client.scala b/src/main/scala/com/cognite/sdk/scala/v1/Client.scala index 5e19154cf..905738569 100644 --- a/src/main/scala/com/cognite/sdk/scala/v1/Client.scala +++ b/src/main/scala/com/cognite/sdk/scala/v1/Client.scala @@ -164,7 +164,6 @@ final case class RequestSession[F[_]: Monad: Trace]( def flatMap[R, R1](r: F[R], f: R => F[R1]): F[R1] = r.flatMap(f) } -// scalastyle:off parameter.number class GenericClient[F[_]: Trace]( applicationName: String, val projectName: String, @@ -192,7 +191,6 @@ class GenericClient[F[_]: Trace]( clientTag, cdfVersion ) - // scalastyle:on parameter.number import GenericClient._ diff --git a/src/main/scala/com/cognite/sdk/scala/v1/dataModelProperties.scala b/src/main/scala/com/cognite/sdk/scala/v1/dataModelProperties.scala index 5615f51c1..cdc3f1e64 100644 --- a/src/main/scala/com/cognite/sdk/scala/v1/dataModelProperties.scala +++ b/src/main/scala/com/cognite/sdk/scala/v1/dataModelProperties.scala @@ -7,8 +7,6 @@ import java.time.{LocalDate, ZonedDateTime} import io.circe.{ACursor, Decoder, Encoder, Json} import io.circe.syntax._ -// scalastyle:off number.of.types - sealed abstract case class DataModelProperty[V](value: V)(implicit encoder: Encoder[V]) { import io.circe.parser._ def encode: Json = @@ -56,7 +54,6 @@ sealed abstract class ArrayPropertyType[V, P <: PrimitivePropertyType[V]](privat } // There are a lot of property types, but it can't be helped. -// scalastyle:off number.of.types object PropertyType { val values: Seq[PropertyType[_]] = Seq[PropertyType[_]]( @@ -149,4 +146,3 @@ object PropertyType { extends ArrayPropertyType[String, PropertyType.Geography.type](PropertyType.Geography) } } -// scalastyle:on number.of.types diff --git a/src/main/scala/com/cognite/sdk/scala/v1/fdm/common/properties/PropertyDefinition.scala b/src/main/scala/com/cognite/sdk/scala/v1/fdm/common/properties/PropertyDefinition.scala index 622556bb3..34bff6088 100644 --- a/src/main/scala/com/cognite/sdk/scala/v1/fdm/common/properties/PropertyDefinition.scala +++ b/src/main/scala/com/cognite/sdk/scala/v1/fdm/common/properties/PropertyDefinition.scala @@ -136,7 +136,6 @@ object PropertyDefinition { } } - // scalastyle:off cyclomatic.complexity private def propertyTypeBasedPropertyDefaultValue( propType: PropertyType, defaultValueJson: Option[Json] @@ -174,7 +173,6 @@ object PropertyDefinition { } defaultValue } - // scalastyle:on cyclomatic.complexity implicit val connectionDefinitionDecoder: Decoder[ConnectionDefinition] = List[Decoder[ConnectionDefinition]]( diff --git a/src/main/scala/com/cognite/sdk/scala/v1/fdm/instances/InstanceDefinition.scala b/src/main/scala/com/cognite/sdk/scala/v1/fdm/instances/InstanceDefinition.scala index 8d399e106..fecac35c3 100644 --- a/src/main/scala/com/cognite/sdk/scala/v1/fdm/instances/InstanceDefinition.scala +++ b/src/main/scala/com/cognite/sdk/scala/v1/fdm/instances/InstanceDefinition.scala @@ -240,7 +240,6 @@ object InstanceDefinition { case t => toInstancePropertyTypeOfNonList(propValue, t) } - // scalastyle:off cyclomatic.complexity method.length private def toInstancePropertyTypeOfList( propValue: Json, t: PropertyType @@ -306,9 +305,7 @@ object InstanceDefinition { ) ) } - // scalastyle:on cyclomatic.complexity method.length - // scalastyle:off cyclomatic.complexity method.length private def toInstancePropertyTypeOfNonList( propValue: Json, t: PropertyType @@ -375,5 +372,4 @@ object InstanceDefinition { ) ) } - // scalastyle:on cyclomatic.complexity method.length } diff --git a/src/main/scala/com/cognite/sdk/scala/v1/propertyMap.scala b/src/main/scala/com/cognite/sdk/scala/v1/propertyMap.scala index 0f65974da..ee94642df 100644 --- a/src/main/scala/com/cognite/sdk/scala/v1/propertyMap.scala +++ b/src/main/scala/com/cognite/sdk/scala/v1/propertyMap.scala @@ -92,7 +92,6 @@ object PropertyMap { case _ => dmp.`type`.decodeProperty(c.downField(prop)) } - // scalastyle:off cyclomatic.complexity private def asStringValue(json: Json): Option[String] = json match { case js if js.isString => js.asString @@ -102,5 +101,4 @@ object PropertyMap { case js if js.isArray => js.asArray.map(_.mkString(",")) case js => Some(js.toString()) } - // scalastyle:on cyclomatic.complexity } diff --git a/src/main/scala/com/cognite/sdk/scala/v1/resources/dataPoints.scala b/src/main/scala/com/cognite/sdk/scala/v1/resources/dataPoints.scala index 7651392a1..0f9e345e0 100644 --- a/src/main/scala/com/cognite/sdk/scala/v1/resources/dataPoints.scala +++ b/src/main/scala/com/cognite/sdk/scala/v1/resources/dataPoints.scala @@ -18,7 +18,6 @@ import java.time.Instant import scala.collection.JavaConverters._ // Avoid scala.jdk to keep 2.12 compatibility without scala-collection-compat import scala.util.control.NonFatal -// scalastyle:off number.of.methods class DataPointsResource[F[_]](val requestSession: RequestSession[F]) extends WithRequestSession[F] with BaseUrl { diff --git a/src/test/scala/com/cognite/sdk/scala/common/DataPointsResourceBehaviors.scala b/src/test/scala/com/cognite/sdk/scala/common/DataPointsResourceBehaviors.scala index dc82322fc..513016a40 100644 --- a/src/test/scala/com/cognite/sdk/scala/common/DataPointsResourceBehaviors.scala +++ b/src/test/scala/com/cognite/sdk/scala/common/DataPointsResourceBehaviors.scala @@ -24,7 +24,6 @@ trait DataPointsResourceBehaviors extends Matchers with OptionValues with RetryW def withTimeSeries(testCode: TimeSeries => Any): Unit - // scalastyle:off def dataPointsResource(dataPoints: DataPointsResource[IO])(implicit IORuntime: IORuntime): Unit = { it should "be possible to insert and delete numerical data points" in withTimeSeries { timeSeries => diff --git a/src/test/scala/com/cognite/sdk/scala/common/FilterTest.scala b/src/test/scala/com/cognite/sdk/scala/common/FilterTest.scala index 1541a3d58..ae2517370 100644 --- a/src/test/scala/com/cognite/sdk/scala/common/FilterTest.scala +++ b/src/test/scala/com/cognite/sdk/scala/common/FilterTest.scala @@ -36,7 +36,7 @@ class FilterTest extends SdkTestSpec with OptionValues { @SuppressWarnings(Array("org.wartremover.warts.Null", "org.wartremover.warts.Var", "org.wartremover.warts.AsInstanceOf")) def filterWithCursor(batchSize: Int, limit: Option[Int])(test: Int => Any): Any = { - var hijackedRequest: FilterRequest[DummyFilter] = null // scalastyle:ignore + var hijackedRequest: FilterRequest[DummyFilter] = null val requestHijacker = SttpBackendStub.synchronous.whenAnyRequest.thenRespondF(req => { hijackedRequest = decode[FilterRequest[DummyFilter]](req.body.asInstanceOf[StringBody].s) match { case Right(x) => x diff --git a/src/test/scala/com/cognite/sdk/scala/common/ReadBehaviours.scala b/src/test/scala/com/cognite/sdk/scala/common/ReadBehaviours.scala index b60f17166..61cd7d774 100644 --- a/src/test/scala/com/cognite/sdk/scala/common/ReadBehaviours.scala +++ b/src/test/scala/com/cognite/sdk/scala/common/ReadBehaviours.scala @@ -94,7 +94,6 @@ trait ReadBehaviours extends Matchers with OptionValues with RetryWhile { this: } } - // scalastyle:off def readableWithRetrieve[R <: WithId[Long], W]( readable: Readable[R, IO] with RetrieveByIds[R, IO], idsThatDoNotExist: Seq[Long], diff --git a/src/test/scala/com/cognite/sdk/scala/common/SdkTestSpec.scala b/src/test/scala/com/cognite/sdk/scala/common/SdkTestSpec.scala index 51f777ade..a0ab228fd 100644 --- a/src/test/scala/com/cognite/sdk/scala/common/SdkTestSpec.scala +++ b/src/test/scala/com/cognite/sdk/scala/common/SdkTestSpec.scala @@ -28,20 +28,20 @@ class LoggingSttpBackend[F[_], +P](delegate: SttpBackend[F, P]) extends SttpBack responseMonad.map(try { responseMonad.handleError(delegate.send(request)) { case e: Exception => - println(s"Exception when sending request: ${request.toString}, ${e.toString}") // scalastyle:ignore + println(s"Exception when sending request: ${request.toString}, ${e.toString}") responseMonad.error(e) } } catch { case NonFatal(e) => - println(s"Exception when sending request: ${request.toString}, ${e.toString}") // scalastyle:ignore + println(s"Exception when sending request: ${request.toString}, ${e.toString}") throw e }) { response => - println(s"request ${request.body.toString}") // scalastyle:ignore - println(s"response ${response.toString}") // scalastyle:ignore + println(s"request ${request.body.toString}") + println(s"response ${response.toString}") if (response.isSuccess) { - println(s"For request: ${request.toString} got response: ${response.toString}") // scalastyle:ignore + println(s"For request: ${request.toString} got response: ${response.toString}") } else { - println(s"For request: ${request.toString} got response: ${response.toString}") // scalastyle:ignore + println(s"For request: ${request.toString} got response: ${response.toString}") } response } diff --git a/src/test/scala/com/cognite/sdk/scala/common/StringDataPointsResourceBehaviors.scala b/src/test/scala/com/cognite/sdk/scala/common/StringDataPointsResourceBehaviors.scala index 21b5f3def..fb22f86cb 100644 --- a/src/test/scala/com/cognite/sdk/scala/common/StringDataPointsResourceBehaviors.scala +++ b/src/test/scala/com/cognite/sdk/scala/common/StringDataPointsResourceBehaviors.scala @@ -25,7 +25,6 @@ trait StringDataPointsResourceBehaviors extends Matchers with OptionValues with def withStringTimeSeries(testCode: TimeSeries => Any): Unit - // scalastyle:off def stringDataPointsResource(dataPoints: DataPointsResource[IO])(implicit ioRuntime: IORuntime): Unit = { it should "be possible to insert and delete string data points" in withStringTimeSeries { stringTimeSeries => diff --git a/src/test/scala/com/cognite/sdk/scala/common/WritableBehaviors.scala b/src/test/scala/com/cognite/sdk/scala/common/WritableBehaviors.scala index da84cbc04..5eee2ab45 100644 --- a/src/test/scala/com/cognite/sdk/scala/common/WritableBehaviors.scala +++ b/src/test/scala/com/cognite/sdk/scala/common/WritableBehaviors.scala @@ -13,7 +13,6 @@ import org.scalatest.matchers.should.Matchers @SuppressWarnings(Array("org.wartremover.warts.NonUnitStatements", "org.wartremover.warts.SizeIs")) trait WritableBehaviors extends Matchers with OptionValues { this: AnyFlatSpec => - // scalastyle:off def writable[R <: ToCreate[W] with WithId[PrimitiveId], W, PrimitiveId]( writable: Create[R, W, IO] with CreateOne[R, W, IO], maybeDeletable: Option[DeleteByIds[IO, PrimitiveId]], diff --git a/src/test/scala/com/cognite/sdk/scala/common/internal/CachedResourceSpec.scala b/src/test/scala/com/cognite/sdk/scala/common/internal/CachedResourceSpec.scala index 3db075a30..1081a2791 100644 --- a/src/test/scala/com/cognite/sdk/scala/common/internal/CachedResourceSpec.scala +++ b/src/test/scala/com/cognite/sdk/scala/common/internal/CachedResourceSpec.scala @@ -2,8 +2,6 @@ // SPDX-License-Identifier: MIT // From https://gist.github.com/Daenyth/28243952f1fcfac6e8ef838040e8638e/9167a51f41322c53de492186c7bfab609fe78f8d -// scalastyle:off - package com.cognite.sdk.scala.common.internal import cats.effect.kernel.Outcome diff --git a/src/test/scala/com/cognite/sdk/scala/v1/AssetsTest.scala b/src/test/scala/com/cognite/sdk/scala/v1/AssetsTest.scala index 3c1ebe6e3..49d5367cb 100644 --- a/src/test/scala/com/cognite/sdk/scala/v1/AssetsTest.scala +++ b/src/test/scala/com/cognite/sdk/scala/v1/AssetsTest.scala @@ -188,7 +188,7 @@ class AssetsTest extends SdkTestSpec with ReadBehaviours with WritableBehaviors Asset(name = "scala-sdk-update-2", description = Some("description-2"), dataSetId = Some(testDataSet.id)) ) private val assetUpdates = Seq( - Asset(name = "scala-sdk-update-1-1", description = null, dataSetId = Some(testDataSet.id)), // scalastyle:ignore null + Asset(name = "scala-sdk-update-1-1", description = null, dataSetId = Some(testDataSet.id)), Asset(name = "scala-sdk-update-2-1") ) it should behave like updatable( diff --git a/src/test/scala/com/cognite/sdk/scala/v1/DataSetsTest.scala b/src/test/scala/com/cognite/sdk/scala/v1/DataSetsTest.scala index 291d92d4c..637301bd6 100644 --- a/src/test/scala/com/cognite/sdk/scala/v1/DataSetsTest.scala +++ b/src/test/scala/com/cognite/sdk/scala/v1/DataSetsTest.scala @@ -58,7 +58,7 @@ class DataSetsTest extends SdkTestSpec with ReadBehaviours with WritableBehavior ) private val datasetUpdates = Seq( - DataSet(description = Some("desc-1-1"), name = null), // scalastyle:ignore null + DataSet(description = Some("desc-1-1"), name = null), DataSet( description = Some("desc-2-1"), metadata = Some(Map("a" -> "b")) diff --git a/src/test/scala/com/cognite/sdk/scala/v1/EventsTest.scala b/src/test/scala/com/cognite/sdk/scala/v1/EventsTest.scala index e2eaca56e..2bfcb7df9 100644 --- a/src/test/scala/com/cognite/sdk/scala/v1/EventsTest.scala +++ b/src/test/scala/com/cognite/sdk/scala/v1/EventsTest.scala @@ -146,7 +146,7 @@ class EventsTest extends SdkTestSpec with ReadBehaviours with WritableBehaviors Event(description = Some("scala-sdk-update-3"), `type` = Some("test"), dataSetId = Some(testDataSet.id)) ) private val eventUpdates = Seq( - Event(description = Some("scala-sdk-update-1-1"), `type` = Some("testA"), subtype = Some(null)), // scalastyle:ignore null + Event(description = Some("scala-sdk-update-1-1"), `type` = Some("testA"), subtype = Some(null)), Event( description = Some("scala-sdk-update-2-1"), `type` = Some("testA"), diff --git a/src/test/scala/com/cognite/sdk/scala/v1/SequencesTest.scala b/src/test/scala/com/cognite/sdk/scala/v1/SequencesTest.scala index f573427ee..4c772c7e8 100644 --- a/src/test/scala/com/cognite/sdk/scala/v1/SequencesTest.scala +++ b/src/test/scala/com/cognite/sdk/scala/v1/SequencesTest.scala @@ -133,7 +133,7 @@ class SequencesTest extends SdkTestSpec with ReadBehaviours with WritableBehavio private val sequencesUpdates = Seq( Sequence( name = Some("scala-sdk-write-example-1-1"), - description = Some(null), // scalastyle:ignore null + description = Some(null), columns = NonEmptyList.of(SequenceColumn(name = Some("string-column"), externalId = Some(s"string-column-$eid"))) ), Sequence( diff --git a/src/test/scala/com/cognite/sdk/scala/v1/TimeSeriesTest.scala b/src/test/scala/com/cognite/sdk/scala/v1/TimeSeriesTest.scala index cbd70fd6d..71f565e57 100644 --- a/src/test/scala/com/cognite/sdk/scala/v1/TimeSeriesTest.scala +++ b/src/test/scala/com/cognite/sdk/scala/v1/TimeSeriesTest.scala @@ -69,7 +69,7 @@ class TimeSeriesTest extends SdkTestSpec with ReadBehaviours with WritableBehavi TimeSeries(name = Some("scala-sdk-write-example-2")) ) private val timeSeriesUpdates = Seq( - TimeSeries(name = Some("scala-sdk-write-example-1-1"), description = Some(null)), // scalastyle:ignore null + TimeSeries(name = Some("scala-sdk-write-example-1-1"), description = Some(null)), TimeSeries(name = Some("scala-sdk-write-example-2-1"), description = Some("scala-sdk-write-example-2"), dataSetId = Some(testDataSet.id)) ) it should behave like updatable( diff --git a/src/test/scala/com/cognite/sdk/scala/v1/fdm/Utils.scala b/src/test/scala/com/cognite/sdk/scala/v1/fdm/Utils.scala index 29aa626cd..f7b3d5040 100644 --- a/src/test/scala/com/cognite/sdk/scala/v1/fdm/Utils.scala +++ b/src/test/scala/com/cognite/sdk/scala/v1/fdm/Utils.scala @@ -99,7 +99,6 @@ object Utils { containerPropertyIdentifier = containerPropertyIdentifier ) - // scalastyle:off cyclomatic.complexity method.length def createAllPossibleContainerPropCombinations: Map[String, ContainerPropertyDefinition] = { val boolOptions = List( true, @@ -150,7 +149,6 @@ object Utils { ) }).toMap } - // scalastyle:on cyclomatic.complexity method.length def createAllPossibleViewPropCombinations: Map[String, ViewCorePropertyDefinition] = createAllPossibleContainerPropCombinations.map { @@ -362,7 +360,6 @@ object Utils { ) ) - // scalastyle:off cyclomatic.complexity private def listContainerPropToInstanceProperty( propName: String, propertyType: PropertyType @@ -400,9 +397,7 @@ object Utils { InstancePropertyValue.TimeSeriesReferenceList(List("ts1", "ts2", "ts3", "ts4")) case other => throw new IllegalArgumentException(s"Unknown value :${other.toString}") } - // scalastyle:on cyclomatic.complexity - // scalastyle:off cyclomatic.complexity private def nonListContainerPropToInstanceProperty( propName: String, propertyType: PropertyType @@ -446,7 +441,6 @@ object Utils { InstancePropertyValue.SequenceReference(s"$propName-reference") case other => throw new IllegalArgumentException(s"Unknown value :${other.toString}") } - // scalastyle:on cyclomatic.complexity private def toInstanceData( ref: SourceReference, @@ -457,7 +451,6 @@ object Utils { properties = Some(instancePropertyValues.mapValues(v => Some(v)).toMap) ) - // scalastyle:off cyclomatic.complexity private def propertyDefaultValueForPropertyType( p: PropertyType, withDefault: Boolean @@ -509,6 +502,4 @@ object Utils { } else { None } - // scalastyle:on cyclomatic.complexity - }