Skip to content

Custom lint check for nullability annotations on method parameters and return values

License

Notifications You must be signed in to change notification settings

rzhukov/NullabilityLint

Repository files navigation

Custom nullability Lint check

Check if method parameters and method return value are annotated with nullability annotations:

  • Nullable
  • NonNull
  • NotNull

Note: this library does not add any methods to your result apk. It was made as aar dependency just to enable the check in Android Studio automatically.

Tested on Android Studio 2.2.2, IntelliJ IDEA 2016.2.5.

Download

Currently available on OSS repo

repositories {
    maven {
        url 'https://oss.sonatype.org/content/groups/public'
    }
}

Add library as a dependency:

compile 'com.github.rzhukov:nullability-lint:0.1.0-SNAPSHOT'

Usage

Nothing special. Just get this library, refresh and compile your gradle project. Then you'll be able to see something like this:

Lint message

About

Custom lint check for nullability annotations on method parameters and return values

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages