Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a configurable pre-commit hook solution available for android?

Coming from a python background have been using flake8 to install pre-commit hooks that check python code for pylint/pep08 violations.

Is there a similar solution available for android?

Came across git-lint but looking for something that is more customized for android project.

Also the lint tool that comes with android tools runs quite long and doesn't seem to be an ideal solution for a pre-commit hook.

Seems using checkstyle.xml with the list of rules is the most standard way. Went through a bunch of open source android projects and most seem to be using checkstyle.xml.

Any other better alternatives out there?

like image 783
Vikas Gulati Avatar asked Jun 12 '26 04:06

Vikas Gulati


1 Answers

Android lint to the rescue: 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.

like image 185
Coder Roadie Avatar answered Jun 13 '26 18:06

Coder Roadie