PMD Static Code Analyzer Ruleset and sample usage
Create a folder inside app directory, sample file tree shown below;
app/quality_tools
quality_tools.gradle and pmd-rules.xml
Run it via android studio terminal by calling ./gradlew pmd (mac os)
Have fun with your more readable, standartized and bug-free code.