rspec/rules/S2183/exceptions.adoc

11 lines
311 B
Plaintext

=== Exceptions
This rule doesn't raise an issue when the shift by zero is obviously for cosmetic reasons:
* When the value shifted is a literal.
* When there is a similar shift at the same position on line before or after. E.g.:
----
bytes[loc+0] = (byte)(value >> 8);
bytes[loc+1] = (byte)(value >> 0);
----