一款静态代码检测工具,包含阿里java规约检测和lint检测,支持自定义pmd和lint配置,结合git在代码提交时进行增量检测 支持android build gradle版本为com.android.tools.build:gradle:3.1.3
#使用
在工程文件的gradle中声明插件引用
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath "com.skateboard:hecatoncheires:1.0.1"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
在项目module的gradle文件中引用插件
apply plugin: 'hecatoncheires'
在项目module中设置extension
hecatoncheires {
enable = true //是否开启提交时检测功能
preCompile=false //是否会编译文件,false时不会编译生成class文件,减少检测时间
}
默认报告输出:阿里集团规约检测在在app/build/reports/pmd路径下,lint检测报告在app/build/reports下,报告输出路径可以通过lint和pmd的相关extension配置
支持lint和pmd的相关extension,具体配置请参考相关文档