Skip to content

Commit

Permalink
Add back nowarn annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
kyri-petrou committed May 23, 2024
1 parent 2d24ffb commit 9a0bea5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/src/main/scala/caliban/parsing/parsers/Parsers.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ import caliban.parsing.adt.Type._
import caliban.parsing.adt._
import fastparse._

import scala.annotation.nowarn

@nowarn("msg=NoWhitespace") // False positive warning in Scala 2.12.x
object Parsers extends SelectionParsers {
def argumentDefinition(implicit ev: P[Any]): P[InputValueDefinition] =
(stringValue.? ~ name ~ ":" ~ type_ ~ defaultValue.? ~ directives.?).map {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import caliban.parsing.adt.Type._
import caliban.parsing.adt._
import fastparse._

import scala.annotation.nowarn

@nowarn("msg=NoWhitespace") // False positive warning in Scala 2.12.x
private[caliban] trait SelectionParsers extends ValueParsers {

def aliasOrName(implicit ev: P[Any]): P[String] = ":" ~/ name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import caliban.InputValue._
import caliban.Value._
import fastparse._

import scala.annotation.nowarn

@nowarn("msg=NoWhitespace") // False positive warning in Scala 2.12.x
private[caliban] trait ValueParsers extends NumberParsers {
def booleanValue(implicit ev: P[Any]): P[BooleanValue] =
StringIn("true", "false").!.map(v => BooleanValue(v.toBoolean))
Expand Down

0 comments on commit 9a0bea5

Please sign in to comment.