Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for NullAway #33

Closed
leinardi opened this issue Apr 11, 2018 · 2 comments
Closed

Add support for NullAway #33

leinardi opened this issue Apr 11, 2018 · 2 comments

Comments

@leinardi
Copy link

leinardi commented Apr 11, 2018

It would be nice to have support for the Error Prone's plugin NullAway. It is getting really popular and is quite useful to help eliminate NullPointerException.

The console output looks like this:

:sample:compileReleaseNdk NO-SOURCE
:sample:processReleaseJavaRes NO-SOURCE
/home/travis/build/leinardi/FloatingActionButtonSpeedDial/library/src/main/java/com/leinardi/android/speeddial/SpeedDialActionItem.java:162: error: [NullAway] initializer method does not guarantee @NonNull field mLabel is initialized along all control-flow paths (remember to check for exceptions or early returns).
        public Builder(@IdRes int id, @DrawableRes int fabImageResource) {
               ^
    (see http://t.uber.com/nullaway )
/home/travis/build/leinardi/FloatingActionButtonSpeedDial/library/src/main/java/com/leinardi/android/speeddial/SpeedDialActionItem.java:175: error: [NullAway] initializer method does not guarantee @NonNull field mLabel is initialized along all control-flow paths (remember to check for exceptions or early returns).
        public Builder(@IdRes int id, @Nullable Drawable drawable) {
               ^
    (see http://t.uber.com/nullaway )
2 errors

My guess is that shouldn't be too different to parse than the base Error Prone error.

tomasbjerre added a commit that referenced this issue Apr 14, 2018
@tomasbjerre
Copy link
Owner

I added that output and tried with the Error Prone parser and I think it looks good. Did you try that?

tomasbjerre added a commit that referenced this issue Apr 14, 2018
@leinardi
Copy link
Author

You are right, this is working, I guess the report were missing because I got the errors on old code and I have commentOnlyChangedContent set to true.

Thanks again for the nice plugin 👍

PS
Any chance you can have a look at #34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants