-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix Lint Issues #171: Fix numerous errors/warnings #2537
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
Fix Lint Issues #171: Fix numerous errors/warnings #2537
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2537 +/- ##
=========================================
- Coverage 5.89% 5.89% -0.01%
=========================================
Files 258 258
Lines 12306 12307 +1
Branches 1103 1103
=========================================
Hits 726 726
- Misses 11521 11522 +1
Partials 59 59
Continue to review full report at Codecov.
|
@@ -108,7 +108,7 @@ public void getCampaigns() { | |||
} | |||
|
|||
@Override public void onError(Throwable e) { | |||
Log.e(TAG, "could not fetch campaigns: " + e.getMessage()); | |||
Timber.tag(TAG).e("could not fetch campaigns: %s", e.getMessage()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine, but is it even better to use e(Throwable, String, ...)
?
@@ -108,7 +108,7 @@ public void getCampaigns() { | |||
} | |||
|
|||
@Override public void onError(Throwable e) { | |||
Log.e(TAG, "could not fetch campaigns: " + e.getMessage()); | |||
Timber.tag(TAG).e("could not fetch campaigns: %s", e.getMessage()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is TAG really necessary here? I thought Timber automatically adds the class name in place of a tag. Again, this might not be something you introduced, but it would be good if we can fix it altogether.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will look in to this further and update the code.
f87bcab
to
c8350ea
Compare
@@ -108,7 +107,7 @@ public void getCampaigns() { | |||
} | |||
|
|||
@Override public void onError(Throwable e) { | |||
Log.e(TAG, "could not fetch campaigns: " + e.getMessage()); | |||
Timber.e(e.getMessage(), "could not fetch campaigns"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this form the first argument needs to be Throwable. Just Timber.e(e, "could not fetch campaigns")
will do the job, I believe.
Fixes numerous Lint errors and warnings:
Fixes #171 Fix Lint errors/warnings