0

sender ! true

and

sender ! false

are generating "Boolean expression can be simplified" warnings by scalastyle.

How can I make these warnings go away?

zzztimbo
  • 2,293
  • 4
  • 28
  • 31

1 Answers1

1

You can disable the SimplifyBooleanExpression checker on the lines where you use ! true or ! false.

sender ! true // scalastyle:ignore simplify.boolean.expression

Or on multiple lines :

// scalastyle:off simplify.boolean.expression
sender ! false
// scalastyle:on simplify.boolean.expression
Peter Neyens
  • 9,770
  • 27
  • 33
  • 1
    What do you mean ? The `SimplifyBooleanExpressionChecker` will be in your *scalastyle-config.xml* file. Scalastyle sees `! true` and thinks it can be replaced by `false`, it's not smart enough to see that in this case it's the akka `!` operator. – Peter Neyens Jun 08 '16 at 08:45