Reports unnecessary unary minuses. Such expressions might be hard to understand and might contain errors.

For example:

void unaryMinus(int i) {
    int x = - -i;
  }

The following quick fixes are suggested here:

Another example:

void unaryMinus(int i) {
    i += - 8;
  }

After the quick-fix is applied:

void unaryMinus(int i) {
    i -= 8;
  }