Skip to content

Files

Latest commit

 

History

History
21 lines (14 loc) · 539 Bytes

MultipleUnaryOperators.md

File metadata and controls

21 lines (14 loc) · 539 Bytes

Pattern: Multiple unary operators

Issue: -

Description

Checks for multiple consecutive unary operators. These are confusing, and are likely typos and bugs.

Example of violations:

int z = ~~2             // violation
boolean b = !!true      // violation
boolean c = !!!false    // 2 violations
int j = -~7             // violation
int k = +~8             // violation

Further Reading