Is there a custom commit before commit solution for Android?

Coming from the python background, flake8 is used to set hooks that check the python code for pylint / pep08 violations.

Is there a similar solution for Android?

Went over git-lint but looking for something more customized for an android project.

Also the lint tool that comes with Android tools has been around for quite some time and doesn't seem to be the ideal solution for snapping before commit.

It seems like using checkstyle.xml with a list of rules is the most standard way. Been going through a bunch of Android open source projects and most of them seem to use checkstyle.xml.

Any other alternatives?

+3


source to share


2 answers


What I ultimately found was not really a pre-commit binding, but an alternative way to validate the code (moreover, I would say).



This blog gives a really smart idea of ​​how to use CheckStyle , PMD , FindBugs and Android Lint to keep a tab with code quality using gradle.

+1


source


Android Help: http://developer.android.com/tools/help/lint.html



You get this for free in Android Studio builds, but also from the command line via Gradle.

+1


source







All Articles