uber / AutoDispose

Automatic binding+disposal of RxJava streams.
https://uber.github.io/AutoDispose/
Apache License 2.0
3.37k stars 226 forks source link

lint lenient mode support kotlin lambda/when/if expressions #466

Closed sanggggg closed 2 years ago

sanggggg commented 2 years ago

Description: if lint lenient mode enabled, unused disposable in kotlin lambda/when/if expressions should be checked.

So this PR change behavior of AutoDisposeDetector::isExpressionValueUnused to support checking reactive expressions in kotlin lambda/when/if expressions used or not.

Luckily, up-to-date origin reference of function isExpressionValueUnused function support these expressions, so i just update source code from origin and add some testcases

Related issue(s): #465

CLAassistant commented 2 years ago

CLA assistant check
All committers have signed the CLA.

ZacSweers commented 2 years ago

This is great, thanks! Apologies for the delay in looking, I missed this PR

ZacSweers commented 2 years ago

Looks like this just needs a ./gradlew spotlessApply

sanggggg commented 2 years ago

Looks like this just needs a ./gradlew spotlessApply

1cd69cc thank you 🙏

ZacSweers commented 2 years ago

Thanks!