Lint Report: 11 errors
Issue Types

Overview

Correctness
7error CheckResult: Ignoring results
4error RestrictedApi: Restricted API
Performance
18warning UnusedResources: Unused resources
Disabled Checks (31)

Ignoring results

../../src/main/java/net/squanchy/onboarding/account/AccountOnboardingActivity.kt:46: The result of subscribe is not used
  43         super.onStart()
  44 
  45         disableUi()
  46         signInService.isSignedInToGoogle()                                                          
  47             .observeOn(AndroidSchedulers.mainThread())
  48             .timeout(SIGNIN_STATE_CHECK_TIMEOUT_SECONDS, TimeUnit.SECONDS)
  49             .subscribe(
../../src/main/java/net/squanchy/eventdetails/EventDetailsService.kt:27: The result of just is not used
 24                 optionalUser
 25                     .map {
 26                         if (it.isAnonymous) {
 27                             Single.just(FavoriteResult.MUST_AUTHENTICATE)                           
 28                         } else {
 29                             toggleFavoriteOn(event)
 30                                 .andThen(Single.just(FavoriteResult.SUCCESS))
../../src/main/java/net/squanchy/eventdetails/EventDetailsService.kt:29: The result of andThen is not used
 26                         if (it.isAnonymous) {
 27                             Single.just(FavoriteResult.MUST_AUTHENTICATE)
 28                         } else {
 29                             toggleFavoriteOn(event)                                                 
 30                                 .andThen(Single.just(FavoriteResult.SUCCESS))
 31                         }
 32                     }
../../src/main/java/net/squanchy/service/firebase/FirebaseAuthService.kt:40: The result of error is not used
  37   private fun deleteUserAndSignInWithCredentialIfLinkingFailed(user: FirebaseUser, credential: AuthCredential): (Throwable) -> CompletableSource {
  38       return {
  39           if (!linkingFailed(it)) {
  40               Completable.error(it)                                                               
  41           } else {
  42               if (!user.isAnonymous) {
  43                   Completable.error(IllegalStateException("Trying to link user with Google with non anonymous user", it))
../../src/main/java/net/squanchy/service/firebase/FirebaseAuthService.kt:43: The result of error is not used
  40       Completable.error(it)
  41   } else {
  42       if (!user.isAnonymous) {
  43           Completable.error(IllegalStateException("Trying to link user with Google with non anonymous user", it))
  44       }
  45 
  46       deleteUser(user).andThen(signInWithGoogleCredential(credential))
../../src/main/java/net/squanchy/service/firebase/FirebaseAuthService.kt:46: The result of andThen is not used
  43                   Completable.error(IllegalStateException("Trying to link user with Google with non anonymous user", it))
  44               }
  45 
  46               deleteUser(user).andThen(signInWithGoogleCredential(credential))                    
  47           }
  48       }
  49   }
../../src/main/java/net/squanchy/signin/SignInService.kt:28: The result of flatMapCompletable is not used
 25             .firstOrError()
 26             .flatMapCompletable { user ->
 27                 if (user.isPresent) {
 28                     currentUser()                                                                   
 29                         .firstOrError()
 30                         .flatMapCompletable { Completable.complete() }
 31                 }
CheckResult Correctness Error Priority 6/10

Restricted API

../../src/main/java/net/squanchy/home/BottomNavigationHelper.kt:19: BottomNavigationItemView.setShiftingMode can only be called from within the same library group (groupId=com.android.support)
 16         shiftingMode.isAccessible = false
 17         for (view in menuView.children) {
 18             val item = view as BottomNavigationItemView
 19             item.setShiftingMode(false)                                                             
 20             item.setChecked(item.itemData.isChecked)
 21         }
 22     } catch (e: NoSuchFieldException) {
../../src/main/java/net/squanchy/home/BottomNavigationHelper.kt:20: BottomNavigationItemView.getItemData can only be called from within the same library group (groupId=com.android.support)
 17         for (view in menuView.children) {
 18             val item = view as BottomNavigationItemView
 19             item.setShiftingMode(false)
 20             item.setChecked(item.itemData.isChecked)                                                
 21         }
 22     } catch (e: NoSuchFieldException) {
 23         Timber.e(e, "Unable to get shift mode field")
../../src/main/java/net/squanchy/home/BottomNavigationHelper.kt:20: BottomNavigationItemView.setChecked can only be called from within the same library group (groupId=com.android.support)
 17         for (view in menuView.children) {
 18             val item = view as BottomNavigationItemView
 19             item.setShiftingMode(false)
 20             item.setChecked(item.itemData.isChecked)                                                
 21         }
 22     } catch (e: NoSuchFieldException) {
 23         Timber.e(e, "Unable to get shift mode field")
../../src/main/java/net/squanchy/home/BottomNavigationHelper.kt:20: MenuItemImpl.isChecked can only be called from within the same library group (groupId=com.android.support)
 17         for (view in menuView.children) {
 18             val item = view as BottomNavigationItemView
 19             item.setShiftingMode(false)
 20             item.setChecked(item.itemData.isChecked)                                                
 21         }
 22     } catch (e: NoSuchFieldException) {
 23         Timber.e(e, "Unable to get shift mode field")
RestrictedApi Correctness Error Priority 4/10

Unused resources

../../src/main/res/values/colors.xml:12: The resource R.color.experience_level_intermediate appears to be unused
  9   <color name="venue_info_label">#38828a</color>
 10 
 11   <color name="experience_level_beginner">#A1D450</color>
 12   <color name="experience_level_intermediate">#EEA53A</color>                                       
 13   <color name="experience_level_advanced">#EE6227</color>
 14 
 15   <color name="navigation_bar_light">#EEEEEE</color>
../../src/main/res/values/colors.xml:13: The resource R.color.experience_level_advanced appears to be unused
 10 
 11   <color name="experience_level_beginner">#A1D450</color>
 12   <color name="experience_level_intermediate">#EEA53A</color>
 13   <color name="experience_level_advanced">#EE6227</color>                                           
 14 
 15   <color name="navigation_bar_light">#EEEEEE</color>
../../src/main/res/values/colors.xml:15: The resource R.color.navigation_bar_light appears to be unused
 12   <color name="experience_level_intermediate">#EEA53A</color>
 13   <color name="experience_level_advanced">#EE6227</color>
 14 
 15   <color name="navigation_bar_light">#EEEEEE</color>                                                
 16 
 17 </resources>
../../src/main/res/values/dimens.xml:123: The resource R.dimen.about_powered_by_margin_bottom appears to be unused
 120   <dimen name="about_app_name_text">26sp</dimen>
 121   <dimen name="about_attribution_label_text">12sp</dimen>
 122   <dimen name="about_powered_by_margin_top">8dp</dimen>
 123   <dimen name="about_powered_by_margin_bottom">16dp</dimen>                                         
 124   <dimen name="about_squanchy_text">48sp</dimen>
 125   <dimen name="about_squanchy_website_text">12sp</dimen>
 126   <dimen name="about_squanchy_website_padding">2dp</dimen>
../../src/main/res/values/dimens.xml:147: The resource R.dimen.onboarding_logo_margin_top appears to be unused
 144   <dimen name="onboarding_skip_button_margin_end">12dp</dimen>
 145 
 146   <dimen name="onboarding_logo_height">140dp</dimen>
 147   <dimen name="onboarding_logo_margin_top">72dp</dimen>                                             
 148   <dimen name="onboarding_content_margin_horizontal">40dp</dimen>
 149   <dimen name="onboarding_title_margin_top">80dp</dimen>
 150   <dimen name="onboarding_title_text">20sp</dimen>
UnusedResources Performance Information Priority 3/10

Disabled Checks

One or more issues were not run by lint, either because the check is not enabled by default, or because it was disabled with a command line flag or via one or more lint.xml configuration files in the project directories.

Suppressing Warnings and Errors

Lint errors can be suppressed in a variety of ways:

1. With a @SuppressLint annotation in the Java code
2. With a tools:ignore attribute in the XML file
3. With a //noinspection comment in the source code
4. With ignore flags specified in the build.gradle file, as explained below
5. With a lint.xml configuration file in the project
6. With a lint.xml configuration file passed to lint via the --config flag
7. With the --ignore flag passed to lint.

To suppress a lint warning with an annotation, add a @SuppressLint("id") annotation on the class, method or variable declaration closest to the warning instance you want to disable. The id can be one or more issue id's, such as "UnusedResources" or {"UnusedResources","UnusedIds"}, or it can be "all" to suppress all lint warnings in the given scope.

To suppress a lint warning with a comment, add a //noinspection id comment on the line before the statement with the error.

To suppress a lint warning in an XML file, add a tools:ignore="id" attribute on the element containing the error, or one of its surrounding elements. You also need to define the namespace for the tools prefix on the root element in your document, next to the xmlns:android declaration:
xmlns:tools="http://schemas.android.com/tools"

To suppress a lint warning in a build.gradle file, add a section like this:

android {
    lintOptions {
        disable 'TypographyFractions','TypographyQuotes'
    }
}

Here we specify a comma separated list of issue id's after the disable command. You can also use warning or error instead of disable to change the severity of issues.

To suppress lint warnings with a configuration XML file, create a file named lint.xml and place it at the root directory of the module in which it applies.

The format of the lint.xml file is something like the following:

<?xml version="1.0" encoding="UTF-8"?>
<lint>
    <!-- Ignore everything in the test source set -->
    <issue id="all">
        <ignore path="*/test/*" />
    </issue>

    <!-- Disable this given check in this project -->
    <issue id="IconMissingDensityFolder" severity="ignore" />

    <!-- Ignore the ObsoleteLayoutParam issue in the given files -->
    <issue id="ObsoleteLayoutParam">
        <ignore path="res/layout/activation.xml" />
        <ignore path="res/layout-xlarge/activation.xml" />
        <ignore regexp="(foo|bar).java" />
    </issue>

    <!-- Ignore the UselessLeaf issue in the given file -->
    <issue id="UselessLeaf">
        <ignore path="res/layout/main.xml" />
    </issue>

    <!-- Change the severity of hardcoded strings to "error" -->
    <issue id="HardcodedText" severity="error" />
</lint>

To suppress lint checks from the command line, pass the --ignore flag with a comma separated list of ids to be suppressed, such as:
$ lint --ignore UnusedResources,UselessLeaf /my/project/path

For more information, see http://g.co/androidstudio/suppressing-lint-warnings