Skip to content

Commit b912ced

Browse files
scala-stewardmichaelmior
authored andcommitted
Reformat with scalafmt 3.9.8
Executed command: scalafmt --non-interactive Signed-off-by: Scala Steward <[email protected]>
1 parent 41c5fc7 commit b912ced

14 files changed

+65
-65
lines changed

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ ThisBuild / assemblyShadeRules := Seq(
196196
assembly / assemblyMergeStrategy := {
197197
case "module-info.class" => MergeStrategy.discard
198198
case "META-INF/versions/9/module-info.class" => MergeStrategy.discard
199-
case x =>
199+
case x =>
200200
val oldStrategy = (assembly / assemblyMergeStrategy).value
201201
oldStrategy(x)
202202
}

src/main/scala/io/github/dataunitylab/jsonoid/discovery/DiscoverSchema.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ object DiscoverSchema {
116116
Some(ArraySchema(items.flatMap(discoverFromValue(_)(p)))(p))
117117
case JBool(bool) => Some(BooleanSchema(bool)(p))
118118
case JDecimal(dec) => Some(NumberSchema(dec)(p))
119-
case JDouble(dbl) => {
119+
case JDouble(dbl) => {
120120
if (dbl.isInfinite) {
121121
None
122122
} else {
@@ -128,7 +128,7 @@ object DiscoverSchema {
128128
case JNothing => Some(NullSchema())
129129
case JNull => Some(NullSchema())
130130
case JObject(fields) => Some(discoverObjectFields(fields)(p))
131-
case JSet(items) =>
131+
case JSet(items) =>
132132
Some(ArraySchema(items.flatMap(discoverFromValue(_)(p)).toList)(p))
133133
case JString(str) => Some(StringSchema(str)(p))
134134
}

src/main/scala/io/github/dataunitylab/jsonoid/discovery/Helpers.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,8 @@ object Helpers {
323323
/** Find the maximum of two values or None if neither is specified. */
324324
def maxOrNone[A: Order](first: Option[A], second: Option[A]): Option[A] =
325325
(first, second) match {
326-
case (Some(a), None) => first
327-
case (None, Some(b)) => second
326+
case (Some(a), None) => first
327+
case (None, Some(b)) => second
328328
case (Some(a), Some(b)) =>
329329
if (b > a) second else first
330330
case (None, None) => None
@@ -333,8 +333,8 @@ object Helpers {
333333
/** Find the minimum of two values or None if neither is specified. */
334334
def minOrNone[A: Order](first: Option[A], second: Option[A]): Option[A] =
335335
(first, second) match {
336-
case (Some(a), None) => first
337-
case (None, Some(b)) => second
336+
case (Some(a), None) => first
337+
case (None, Some(b)) => second
338338
case (Some(a), Some(b)) =>
339339
if (b < a) second else first
340340
case (None, None) => None

src/main/scala/io/github/dataunitylab/jsonoid/discovery/ReferenceResolver.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ object ReferenceResolver extends SchemaWalker[Unit] {
6767

6868
val defs = rootSchema.definitions
6969
strippedPointer.parts match {
70-
case List("$defs", defn) => defs(defn)
71-
case List("definitions", defn) => defs(defn)
70+
case List("$defs", defn) => defs(defn)
71+
case List("definitions", defn) => defs(defn)
7272
case List("$defs", _) | List("definitions", _) =>
7373
throw new UnsupportedOperationException(
7474
"can't resolve nested definition"

src/main/scala/io/github/dataunitylab/jsonoid/discovery/schemas/ArraySchema.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,9 @@ final case class ArraySchema(
188188
}
189189
case Right(schemas) =>
190190
pointer.parts match {
191-
case Nil => None
192-
case List("") => Some(this)
193-
case List(first) => Some(schemas(first.toInt))
191+
case Nil => None
192+
case List("") => Some(this)
193+
case List(first) => Some(schemas(first.toInt))
194194
case (first :: rest) =>
195195
schemas(first.toInt).findByPointer(JsonPointer(rest))
196196
}
@@ -322,7 +322,7 @@ final case class ItemTypeProperty(
322322
ItemTypeProperty()
323323

324324
override def toJson()(implicit p: JsonoidParams): JObject = itemType match {
325-
case Left(schema) => ("items" -> schema.toJson())
325+
case Left(schema) => ("items" -> schema.toJson())
326326
case Right(schemas) =>
327327
if (schemas.nonEmpty) {
328328
if (count > 0) {

src/main/scala/io/github/dataunitylab/jsonoid/discovery/schemas/BooleanSchema.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,12 @@ final case class BooleanConstantProperty(
161161
BooleanConstantProperty(
162162
(allTrue, otherProp.allTrue) match {
163163
case (None, None) => None
164-
case _ =>
164+
case _ =>
165165
Some(allTrue.getOrElse(false) && otherProp.allTrue.getOrElse(false))
166166
},
167167
(allFalse, otherProp.allFalse) match {
168168
case (None, None) => None
169-
case _ =>
169+
case _ =>
170170
Some(allFalse.getOrElse(false) && otherProp.allFalse.getOrElse(false))
171171
}
172172
)

src/main/scala/io/github/dataunitylab/jsonoid/discovery/schemas/DynamicObjectSchema.scala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ final case class DynamicObjectSchema(
5858
override def findByPointer(pointer: JsonPointer): Option[JsonSchema[_]] = {
5959
val typeProp = properties.get[DynamicObjectTypeProperty]
6060
pointer.parts match {
61-
case Nil => None
62-
case List("") => Some(this)
63-
case List(first) => Some(typeProp.valueType)
61+
case Nil => None
62+
case List("") => Some(this)
63+
case List(first) => Some(typeProp.valueType)
6464
case (first :: rest) =>
6565
typeProp.valueType.findByPointer(JsonPointer(rest))
6666
}
@@ -72,9 +72,9 @@ final case class DynamicObjectSchema(
7272
val typeProp = properties.get[DynamicObjectTypeProperty]
7373
val pointerStr = pointer.toString
7474
pointerStr.split("/", 3) match {
75-
case Array(_) => Seq()
76-
case Array(_, "") => Seq(this)
77-
case Array(_, first) => Seq(typeProp.valueType)
75+
case Array(_) => Seq()
76+
case Array(_, "") => Seq(this)
77+
case Array(_, first) => Seq(typeProp.valueType)
7878
case Array(_, first, rest) =>
7979
typeProp.valueType.findByInexactPointer(JsonPointer(List(rest)))
8080
}

src/main/scala/io/github/dataunitylab/jsonoid/discovery/schemas/IntegerSchema.scala

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -254,9 +254,9 @@ final case class MinIntValueProperty(
254254
otherProp: MinIntValueProperty
255255
)(implicit p: JsonoidParams): MinIntValueProperty = {
256256
val exclusive = (minIntValue, otherProp.minIntValue) match {
257-
case (None, _) => this.exclusive
258-
case (_, None) => otherProp.exclusive
259-
case (Some(x), Some(y)) if x > y => this.exclusive
257+
case (None, _) => this.exclusive
258+
case (_, None) => otherProp.exclusive
259+
case (Some(x), Some(y)) if x > y => this.exclusive
260260
case (Some(x), Some(y)) if x === y =>
261261
this.exclusive || otherProp.exclusive
262262
case _ => otherProp.exclusive
@@ -271,9 +271,9 @@ final case class MinIntValueProperty(
271271
otherProp: MinIntValueProperty
272272
)(implicit p: JsonoidParams): MinIntValueProperty = {
273273
val exclusive = (minIntValue, otherProp.minIntValue) match {
274-
case (None, _) => this.exclusive
275-
case (_, None) => otherProp.exclusive
276-
case (Some(x), Some(y)) if x < y => this.exclusive
274+
case (None, _) => this.exclusive
275+
case (_, None) => otherProp.exclusive
276+
case (Some(x), Some(y)) if x < y => this.exclusive
277277
case (Some(x), Some(y)) if x === y =>
278278
this.exclusive && otherProp.exclusive
279279
case _ => otherProp.exclusive
@@ -372,9 +372,9 @@ final case class MaxIntValueProperty(
372372
otherProp: MaxIntValueProperty
373373
)(implicit p: JsonoidParams): MaxIntValueProperty = {
374374
val exclusive = (maxIntValue, otherProp.maxIntValue) match {
375-
case (None, _) => this.exclusive
376-
case (_, None) => otherProp.exclusive
377-
case (Some(x), Some(y)) if x < y => this.exclusive
375+
case (None, _) => this.exclusive
376+
case (_, None) => otherProp.exclusive
377+
case (Some(x), Some(y)) if x < y => this.exclusive
378378
case (Some(x), Some(y)) if x === y =>
379379
this.exclusive || otherProp.exclusive
380380
case _ => otherProp.exclusive
@@ -389,9 +389,9 @@ final case class MaxIntValueProperty(
389389
otherProp: MaxIntValueProperty
390390
)(implicit p: JsonoidParams): MaxIntValueProperty = {
391391
val exclusive = (maxIntValue, otherProp.maxIntValue) match {
392-
case (None, _) => this.exclusive
393-
case (_, None) => otherProp.exclusive
394-
case (Some(x), Some(y)) if x > y => this.exclusive
392+
case (None, _) => this.exclusive
393+
case (_, None) => otherProp.exclusive
394+
case (Some(x), Some(y)) if x > y => this.exclusive
395395
case (Some(x), Some(y)) if x === y =>
396396
this.exclusive && otherProp.exclusive
397397
case _ => otherProp.exclusive

src/main/scala/io/github/dataunitylab/jsonoid/discovery/schemas/JsonSchema.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ object JsonSchema {
2222
case JBool(true) => AnySchema()
2323
case JBool(false) => ZeroSchema()
2424
case o: JObject => fromJsonObjectValue(o)
25-
case _ =>
25+
case _ =>
2626
throw new UnsupportedOperationException("invalid schema element")
2727
}
2828
}
@@ -82,7 +82,7 @@ object JsonSchema {
8282
(schema \ "type") match {
8383
case s: JString => List(s.extract[String])
8484
case a: JArray => a.extract[List[String]]
85-
case _ =>
85+
case _ =>
8686
throw new UnsupportedOperationException("invalid type")
8787
}
8888
} catch {
@@ -102,7 +102,7 @@ object JsonSchema {
102102
case "null" => NullSchema()
103103
case "object" => ObjectSchema.fromJson(schema)
104104
case "string" => StringSchema.fromJson(schema)
105-
case _ =>
105+
case _ =>
106106
throw new UnsupportedOperationException("type not supported")
107107
}
108108

src/main/scala/io/github/dataunitylab/jsonoid/discovery/schemas/NullSchema.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ final case class NullSchema(
4141
recursive: Boolean = true
4242
)(implicit p: JsonoidParams): Boolean = {
4343
other match {
44-
case _: NullSchema => true
44+
case _: NullSchema => true
4545
case ps: ProductSchema =>
4646
val schemaTypes =
4747
ps.properties.get[ProductSchemaTypesProperty].schemaTypes

0 commit comments

Comments
 (0)