Scala

Scala

Made by DeepSource

Using the logical not operator to invert binary expressions can affect readability SC-R1070

Anti-pattern
Major

Using the logical not operator ! to invert the result of a binary expression's result can affect readability as it requires that the reader first comprehend the binary expression and then mentally invert the result. This can interrupt the natural flow of reading the code, thereby affecting readability. It is recommended that you refactor this expression.

Bad Practice

val isPi = !(pi != 3.14)

Recommended

val isPi = pi == 3.14