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 where IDE prompts for clarifying parentheses. #4495
Comments
We should look at the rule that is warning this in IJ and see if we can integrate it in this rule. |
Can we confirm that is a IDE warning and not a compiler warning? A compiler warning would be way easier to integrate if so. |
Yes, these one was fixed. Closing. |
@BraisGabin I found two occurrences where the IDE tells me to add clarifying parentheses, but after I do, detekt says it is a
and
|
I was thinking that maybe #5684 would fix it. But after checking a bit more it doesn't seem so. |
Hi @BraisGabin / @eygraber I have added the fix at #5983 |
The following code triggers a warning in the IDE, saying
Expression should use clarifying parentheses
:It wants to correct it to:
But detekt flags it as
UnnecessaryParentheses
. I see the value of adding parentheses here, and a few other places that the IDE is suggesting it, but I don't want to have to suppress the detekt check in all of those places.Can detekt use similar logic to exclude these cases?
The text was updated successfully, but these errors were encountered: