scalaakkascalastyle

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?


Solution

  • 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