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?
2 Answers
Answers 1
What I ultimately found wasn't exactly a pre-commit hook but an alternate way for having code styling checks (more of an android/gradle way I would say).
This blog gives a really resourceful insight onto how to go about using CheckStyle, PMD, FindBugs and Android Lint tool to keep a tab on your code quality using gradle.
Answers 2
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.
0 comments:
Post a Comment