-
-
Notifications
You must be signed in to change notification settings - Fork 783
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
VarCouldBeVal: don't report assigned property that is defined in anonymous object #3880
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3880 +/- ##
============================================
+ Coverage 83.50% 83.51% +0.01%
- Complexity 3115 3118 +3
============================================
Files 456 456
Lines 9001 8992 -9
Branches 1757 1752 -5
============================================
- Hits 7516 7510 -6
Misses 566 566
+ Partials 919 916 -3
Continue to review full report at Codecov.
|
@@ -41,6 +43,7 @@ private val unaryAssignmentOperators = setOf(KtTokens.MINUSMINUS, KtTokens.PLUSP | |||
* </compliant> | |||
*/ | |||
@ActiveByDefault(since = "1.16.0") | |||
@RequiresTypeResolution |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems quite unfortunate that we are now converting plain rules to type resolving rules like such.
I think this PR should still be good to go, but I would want to highlight this for us to favor detekt compiler plugin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we could mention this in the release notes but we're good to go imho.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, thanks for fixing this 🙏
} | ||
} | ||
} | ||
|
||
describe("properties defined in anonymous object - #3805") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you be able to add a test case also for:
#3805 (comment)
Fixes #3805