UnusedPrivateMember - added handling of overloaded array get operator…#3666
Conversation
| this.firstOrNull { it.s == s } | ||
| } | ||
| """ | ||
| assertThat(subject.compileAndLintWithContext(env, code)).hasSize(0) |
There was a problem hiding this comment.
Could you add one test that shows that reports if it's not used?
There was a problem hiding this comment.
Sure. Good call. Totally forgot about it.
4a531f7 to
e4ade96
Compare
Codecov Report
@@ Coverage Diff @@
## main #3666 +/- ##
============================================
+ Coverage 83.48% 83.49% +0.01%
- Complexity 3159 3160 +1
============================================
Files 458 458
Lines 9047 9048 +1
Branches 1759 1760 +1
============================================
+ Hits 7553 7555 +2
- Misses 567 568 +1
+ Partials 927 925 -2
Continue to review full report at Codecov.
|
e4ade96 to
0088c54
Compare
6116def to
e6e9904
Compare
| import org.jetbrains.kotlin.types.expressions.OperatorConventions | ||
| import org.jetbrains.kotlin.util.OperatorNameConventions | ||
|
|
||
| private const val ARRAY_GET_METHOD_NAME = "get" |
There was a problem hiding this comment.
Should the set operator be tracked as well?
There was a problem hiding this comment.
This can be done in a follow up PR (if someone wants to do it)
|
Friendly ping to get the status of this PR @DcortezMeleth If you need further support, let us know 👍 I also stumbled upon this same false positive in another project: https://github.com/cortinico/ktfmt-gradle/pull/32/files#diff-c3cf3f82913f1a5c2d33bd9b78e2b8cfcb4adbf4c82103d773017f79ed3334ae |
e6e9904 to
8160568
Compare
|
I rebased the commit to fix the conflicts and added the missing test that @cortinico talk about. |
8160568 to
1785a15
Compare
… method (#3640)
PR with changes removing UnusedPrivateMember rule false positives regarding overloaded array get operator method.