bangarharshit / Rx-Error-Prone

A set of static analysis tools (error prone checks and lint) to catch common Rx-Java mistake.
MIT License
6 stars 0 forks source link

Keep dangling subscription check scoped to Activity or Fragment #9

Closed bangarharshit closed 6 years ago

bangarharshit commented 6 years ago

Currently dangling subscription issues a warning even in the app scope. Keep it applicable only to activity+ level scope.

bangarharshit commented 6 years ago

To add custom classes with lifecycle such as Conductor or Flow use some kind of marker interface or annotation.

public interface HasLifeCycle { }
bangarharshit commented 6 years ago

Fixed it with a errorprone flag. Will add to documentation.

- XepOpt:LifeCycleClasses=com.rx.errorprone.ComponentWithLifeCycle