zzztimbo
zzztimbo

Reputation: 2353

scalastyle is complaining about akka send of boolean

sender ! true

and

sender ! false

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

How can I make these warnings go away?

Upvotes: 0

Views: 188

Answers (1)

Peter Neyens
Peter Neyens

Reputation: 9820

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

Upvotes: 1

Related Questions