Wiki for AutoDispose scope missing error prone check#162
Wiki for AutoDispose scope missing error prone check#162bangarharshit wants to merge 8 commits intouber:masterfrom
Conversation
Wiki.md
Outdated
| @@ -0,0 +1,117 @@ | |||
| ## Intro | |||
There was a problem hiding this comment.
Please put newlines after all headers. This header should just be the name of the wiki page, and H1 style
Wiki.md
Outdated
| @@ -0,0 +1,117 @@ | |||
| ## Intro | |||
| [Error Prone](https://github.com/google/error-prone) check to detect missing AutoDispose scope within defined scoped elements. | |||
There was a problem hiding this comment.
This isn't a complete sentence
| ## Installation | ||
|
|
||
| Here are sample configurations which pulls in both the ErrorProne and the AutoDispose check. | ||
| ### Gradle |
There was a problem hiding this comment.
Newlines above headers too.
|
|
||
| Here are sample configurations which pulls in both the ErrorProne and the AutoDispose check. | ||
| ### Gradle | ||
| ```gradle |
There was a problem hiding this comment.
We should have an android example here too
There was a problem hiding this comment.
Android example is same - annotationProcessor instead of apt
Wiki.md
Outdated
| </path> | ||
| </annotationProcessorPaths> | ||
| <compilerArgs> | ||
| <arg>--XepOpt:AutoDisposeLeakCheck=com.bluelinelabs.conductor.Controller,android.app.Activity</arg> |
There was a problem hiding this comment.
Explain this line with a comment indicating it's for configuration and optional, like in the gradle example
Wiki.md
Outdated
| ^ | ||
| (see https://github.com/uber/AutoDispose/wiki/Error-Prone-Checker) | ||
| ``` | ||
| ## Command line flags |
There was a problem hiding this comment.
Let's call this Configuration
Wiki.md
Outdated
| (see https://github.com/uber/AutoDispose/wiki/Error-Prone-Checker) | ||
| ``` | ||
| ## Command line flags | ||
| By default the checker is applied to standard android components with lifecycle and autodispose interfaces: |
There was a problem hiding this comment.
Linkify these list items to docs. Also autodispose should be AutoDispose
There was a problem hiding this comment.
Which docs are you talking about? Is there a link to javadocs?
There was a problem hiding this comment.
Wiki.md
Outdated
| 5. ScopeProvider | ||
| 6. LifecycleOwner | ||
|
|
||
| It can be configured by [Error Prone's Command-Line Flags](http://errorprone.info/docs/flags). |
There was a problem hiding this comment.
this is part of a sentence, so Command-Line Flags all don't need to be capitalized. Error Prone should be Error-Prone
Wiki.md
Outdated
|
|
||
| It can be configured by [Error Prone's Command-Line Flags](http://errorprone.info/docs/flags). | ||
|
|
||
| The following flag is supported and takes input in a form of comma separated list: |
There was a problem hiding this comment.
comma-separated list of fully qualified class names of Classes with scopes
Also, specify that the flag is UseAutoDispose. I see in the example though that it's AutoDisposeLeakCheck? Is that still the case? If so we should both fix it and also make it more specific, like ClassesWithScope
Wiki.md
Outdated
|
|
||
| - `-XepOpt:AutoDisposeLeakCheck=com.bluelinelabs.conductor.Controller,android.app.Activity` | ||
|
|
||
| The check is now applied to `Controller` and `Activity` only. |
There was a problem hiding this comment.
"In this case, the check is now...", and emphasize only
|
@harshitbangar123 ping, let's try to minimize how long these PRs are open for |
|
Sorry for the delay. I had to travel due to some urgent thing on my end. Working on it now. |
56fe011 to
c0f6c77
Compare
bangarharshit
left a comment
There was a problem hiding this comment.
@hzsweers merged multiple formatting issues into 1 commit since they were fairly trivial.
Wiki.md
Outdated
| @@ -0,0 +1,117 @@ | |||
| ## Intro | |||
| [Error Prone](https://github.com/google/error-prone) check to detect missing AutoDispose scope within defined scoped elements. | |||
| ## Installation | ||
|
|
||
| Here are sample configurations which pulls in both the ErrorProne and the AutoDispose check. | ||
| ### Gradle |
|
|
||
| Here are sample configurations which pulls in both the ErrorProne and the AutoDispose check. | ||
| ### Gradle | ||
| ```gradle |
Wiki.md
Outdated
| @@ -0,0 +1,117 @@ | |||
| ## Intro | |||
Wiki.md
Outdated
| @@ -0,0 +1,117 @@ | |||
| ## Intro | |||
| [Error Prone](https://github.com/google/error-prone) check to detect missing AutoDispose scope within defined scoped elements. | |||
Wiki.md
Outdated
| ^ | ||
| (see https://github.com/uber/AutoDispose/wiki/Error-Prone-Checker) | ||
| ``` | ||
| ## Command line flags |
Wiki.md
Outdated
| (see https://github.com/uber/AutoDispose/wiki/Error-Prone-Checker) | ||
| ``` | ||
| ## Command line flags | ||
| By default the checker is applied to standard android components with lifecycle and autodispose interfaces: |
Wiki.md
Outdated
| 5. ScopeProvider | ||
| 6. LifecycleOwner | ||
|
|
||
| It can be configured by [Error Prone's Command-Line Flags](http://errorprone.info/docs/flags). |
Wiki.md
Outdated
|
|
||
| It can be configured by [Error Prone's Command-Line Flags](http://errorprone.info/docs/flags). | ||
|
|
||
| The following flag is supported and takes input in a form of comma separated list: |
Wiki.md
Outdated
|
|
||
| - `-XepOpt:AutoDisposeLeakCheck=com.bluelinelabs.conductor.Controller,android.app.Activity` | ||
|
|
||
| The check is now applied to `Controller` and `Activity` only. |
|
Let's keep them separate commits in the future still, as I have to basically reread the whole thing to verify now |
| @@ -1,85 +1,92 @@ | |||
| ## Intro | |||
| # Error Prone Checker | |||
| } | ||
|
|
||
| plugins { | ||
| // we assume you are already using the Java plugin |
| errorprone "com.google.errorprone:error_prone_core:2.1.3" | ||
| } | ||
|
|
||
| tasks.withType(JavaCompile) { |
There was a problem hiding this comment.
Does this need to be qualified?
There was a problem hiding this comment.
It works without that also but the flag will be available for all the checks but this is better - 3d7d905.
There was a problem hiding this comment.
It doesn't need to be. Nullaway is configured like this - https://github.com/uber/NullAway
| 6. LifecycleOwner | ||
|
|
||
| It can be configured by [Error Prone's Command-Line Flags](http://errorprone.info/docs/flags). | ||
| It can be configured by [Error-Prone's command line flags](http://errorprone.info/docs/flags). |
Wiki.md
Outdated
| The following flag is supported and takes input in a form of comma separated list: | ||
| The following flag is supported and takes input in a form of comma separated list of fully qualified class names of Classes with scopes: | ||
|
|
||
| - `-XepOpt:AutoDisposeLeakCheck=com.bluelinelabs.conductor.Controller,android.app.Activity` |
| .subscribe(new Consumer<Long>() { | ||
| ^ | ||
| (see https://github.com/uber/AutoDispose/wiki/Error-Prone-Checker) | ||
| ``` |
There was a problem hiding this comment.
Space after code blocks too. This should be human readable before and after rendering
|
Updated the wiki with a few little changes. Thanks! |
|
Thanks for being so patient. |
Wiki for AutoDispose scope missing error prone check. Fixes issue - #152 and references commit - #156.