Android Linters is a project which contains custom linters for an Android project.
This project allows you to prevent some runtime errors. For example, if you forgot to write a variable in your Parcelable class the linter will tell you what variable you forgot to write.
Check for malformed Parcelable
implementations:
- You forgot to write a variable
- You forgot to read a variable
- You forgot to call super in your constructor or in
writeToParcel
method - You read a different type than you wrote
- You write in a different order than you read
For each case, the linter will show in which line is the error and what is the reason.
Checks that any instantion of a fragment is done in a factory method to prevent forgetting the necessary arguments
Makes sure instance state is properly saved and restored.
- You forgot to save a variable in your
onSaveInstanceState
method - You forgot to restore a variable
- You overwrite a saved variable
- You overwrite a restored variable
- Save and restore different types
It is a xml detector that checks if you request for duplicate permissions in
you AndroidManifest.xml
In the project there is a script that download the jar with all the linters and
it will copy to your directory $HOME/.android/lint/
Copyright 2010-2015 Monits.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License at: