Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@

/**
* Checker for subscriptions not binding to lifecycle in components with lifecycle.
* Use -XepOpt:AutoDisposeLeakCheck flag to add support for custom components with lifecycle.
* Use -XepOpt:ClassesWithScope flag to add support for custom components with lifecycle.
* The sample configuration for Conductor:
* <pre><code>
* -XepOpt:AutoDisposeLeakCheck=com.bluelinelabs.conductor.Controller,android.app.Activity
* -XepOpt:ClassesWithScope=com.bluelinelabs.conductor.Controller,android.app.Activity
* </code></pre>
*/
@AutoService(BugChecker.class)
Expand All @@ -70,7 +70,7 @@ public UseAutoDispose() {
}

public UseAutoDispose(ErrorProneFlags flags) {
Optional<ImmutableList<String>> inputClasses = flags.getList("AutoDisposeLeakCheck");
Optional<ImmutableList<String>> inputClasses = flags.getList("ClassesWithScope");
ImmutableList<String> defaultClassesWithLifecycle = new ImmutableList.Builder<String>()
.add("android.app.Activity")
.add("android.app.Fragment")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void test_autodisposePositiveCasesWithDefaultClass() {
@Test
public void test_autodisposePositiveCaseswithCustomClass() {
compilationHelper.setArgs(
Collections.singletonList("-XepOpt:AutoDisposeLeakCheck"
Collections.singletonList("-XepOpt:ClassesWithScope"
+ "=com.uber.autodispose.error.prone.checker.ComponentWithLifeCycle"));
compilationHelper
.addSourceFile("UseAutoDisposeCustomClassPositiveCases.java")
Expand Down