-
-
Notifications
You must be signed in to change notification settings - Fork 784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UnnecessaryParentheses should be ignored for bit operations #1929
Comments
1.1.0 has a change in behaviour for this rule - it should only flag issues that are also flagged by Kotlin plugin for IntelliJ (see #1890). When 1.1.0 is released please see if the new behaviour helps. If not it's still unlikely that we'll make changes and instead suggest suppressing the rule in these cases, since there were a few issues with this rule in the past and too many edge cases, so we'll now just use same logic as Kotlin itself does. |
This has been fixed by 61f1734. |
In 1.1.0 this issue is still there. Also IntelliJ/Android Studio does not report this. |
Oh I see. Thank you! |
Expected Behavior of the rule
Example:
Context
Bitwise operations in C-like languages have confusing priorities so people usually add parentheses for everything.
This sample code also does not trigger warnings in latest Android Studio (3.6 alpha).
detekt 1.0.1
The text was updated successfully, but these errors were encountered: