lewis

Rock your Android

Purpose

This is an extension for Android Lint, adding new rules:

Exceptions to InstanceVariableName rule:

  1. The class is a model (should be inside a package called 'models').
  2. The variable is declared using @Bind or @InjectView (ButterKnife).

Getting started

Clone this repository

git clone https://github.com/inaka/lewis.git

Enter to the project

cd lewis/

Build it

./gradlew build

Install it

./gradlew install

Verify whether the issues are registered with lint

lint --show RootPackage

Go to any Android project and run lint

./gradlew lint

Note: If you can't run lint directly, you may want to include android tools PATH in your ~/.bash_profile. (i.e. PATH=$PATH:~/Library/Android/sdk/tools)

Then run source ~/.bash_profile.

How to disable an issue

Add on your build.gradle file

android {
    lintOptions {
        disable 'RootPackage','MoreThanOneLauncher'
        ...
    }
}