Scala

Scala

Made by DeepSource

Empty statements block SC-C1004

Style
Minor

Empty blocks do not add anything of value to the codebase. We believe that this is either a copy-paste error or that the programmer forgot to add the relevant statements.

Bad Practice

if (/* some condition */) {

}

def foo(): Unit = ()

Recommended

if (/* some condition */) {
  // do something
} else {
  // do something else
}

def foo(): Unit = {
  // body
}