<commit_before># lewis
Rock your Android

## Purpose

This is an extension for Android Lint, adding new rules:
* RootPackageDetector: Every .java file must be inside a custom package, not inside the root package. ERROR
* MissingLauncherDetector: Every application must have at least one launcher activity. WARNING
* MoreThanOneLauncherDetector: The application must have only one launcher activity. WARNING
* LauncherActivityInLibrary: A library must not have a launcher activity. ERROR
* IconInLibraryDetector: A library must not have icons. ERROR
* PermissionUsageInLibraryDetector: A library must not use permissions. ERROR

## Getting started

Clone the repository
```bash
git clone https://github.com/inaka/lewis.git
```

Enter to the project
```bash
cd lewis/
```

Build it
```bash
./gradlew build
```

Copy the .jar file to the lint folder
```bash
cp ./build/libs/lewis.jar ~/.android/lint/
```

Verify whether the issues are registered with lint
```bash
lint --show RootPackageDetector
```

Run lint
```bash
./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
```groovy
android {
    lintOptions {
        disable 'RootPackageDetector','MoreThanOneLauncherDetector'
        ...
    }
}
```<commit_msg>improving README.md<commit_after># lewis
Rock your Android

## Purpose

This is an extension for Android Lint, adding new rules:
* RootPackageDetector: Every .java file must be inside a custom package, not inside the root package. `ERROR`
* MissingLauncherDetector: Every application must have at least one launcher activity. `WARNING`
* MoreThanOneLauncherDetector: The application must have only one launcher activity. `WARNING`
* LauncherActivityInLibrary: A library must not have a launcher activity. `ERROR`
* IconInLibraryDetector: A library must not have icons. `ERROR`
* PermissionUsageInLibraryDetector: A library must not use permissions. `ERROR`

## Getting started

Clone the repository
```bash
git clone https://github.com/inaka/lewis.git
```

Enter to the project
```bash
cd lewis/
```

Build it
```bash
./gradlew build
```

Copy the .jar file to the lint folder
```bash
cp ./build/libs/lewis.jar ~/.android/lint/
```

Verify whether the issues are registered with lint
```bash
lint --show RootPackageDetector
```

Run lint
```bash
./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
```groovy
android {
    lintOptions {
        disable 'RootPackageDetector','MoreThanOneLauncherDetector'
        ...
    }
}
```
{'fraction_non_alphanumeric': 0.1046993780234969, 'fraction_numerical': 0.0, 'mean_word_length': 4.197486535008976, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '37509', 'n_tokens_mistral': 917, 'n_tokens_neox': 841, 'n_words': 337}