rspec/rules/S2183/exceptions.adoc

11 lines
311 B
Plaintext
Raw Permalink Normal View History

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