Skip to content

Files

Latest commit

 

History

History
28 lines (17 loc) · 381 Bytes

UnusedUnaryOperator.md

File metadata and controls

28 lines (17 loc) · 381 Bytes

Pattern: Unused unary operator

Issue: -

Description

Detects unused unary operators.

Example of incorrect code:

val x = 1 + 2
    + 3 + 4
println(x) // 3

Example of correct code:

val x = 1 + 2 + 3 + 4
println(x) // 10

Further Reading