rspec/rules/S2757/common/fix.adoc

20 lines
278 B
Plaintext
Raw Normal View History

Replace the operators with a single one if that is the intention
[source,java]
----
int target = -5;
int num = 3;
target -= num; // target = -8
----
Or fix the spacing to avoid confusion
[source,java]
----
int target = -5;
int num = 3;
target = -num; // target = -3
----