Scala

Scala

Made by DeepSource

Replace !nonEmpty with isEmpty SC-R1018

Style
Minor

Standard Scala structures provide with both isEmpty and nonEmpty methods. Replacing !nonEmpty with isEmpty makes the code slightly more readable and easier to comprehend.

Bad Practice

if (!list.nonEmpty) {
  // do something
}

Recommended

if (list.isEmpty) {
  // do something
}