Scala

Scala

Made by DeepSource

Simplify verbose boolean comparison SC-R1020

Anti-pattern
Minor

Explicit boolean values on the RHS can be dropped in boolean comparisons.

Bad Practice

if (foo == true) {
  // do something
}

if (bar == false) {
  // do something
}

Recommended

if (foo) {
  // do something
}

if (!bar) {
  // do something
}