lingochamp / okcheck Goto Github PK
View Code? Open in Web Editor NEWIncremental scan,integrate Lint、KtLint、UnitTest、Checkstyle、Findbugs、Pmd, powerful and easy to use
License: Apache License 2.0
Incremental scan,integrate Lint、KtLint、UnitTest、Checkstyle、Findbugs、Pmd, powerful and easy to use
License: Apache License 2.0
比如 某个写法错误,review 没有发现,某种写法会出现错误,可以以后自动检查。
static String okcheckHomePath(Project project) {
File firstCandidate = new File(project.rootProject.absoluteProjectPath("/.okcheck")) //:.okcheck
if (firstCandidate.exists()) return firstCandidate.absolutePath
return "${System.getProperty("user.home")}/.okcheck"
}
//here is false forever
private static boolean isFirstBlood(Project project) {//okcheck is exist
String projectHomePath = "${ChangeFile.okcheckHomePath(project)}/${project.rootProject.name}"
// not exist means first time to invoke okcheck(maybe just clean time).
return !new File(projectHomePath).exists()
}
After integrate, If you want to integrate JacocoReport, just set with:
okcheck {
coverageReport {
xml.enabled = true
html.enabled = true
csv.enabled = true
}
}
现在细化到module,每次检测的输出结果都很多,想细化到文件,但是网上并没有搜到相关介绍,大佬能麻烦讲讲么?
def inputFiles = Util.getAllInputs(project) //where change file?
project.task(getTaskName(flavor, buildType), type: OkLint) {
dependsOn getOriginTaskName(flavor, buildType)
inputs.files(inputFiles)
outputs.file(outputFile)
setGroup("verification")
if (flavor.length() <= 0 && buildType.length() <= 0) {
setDescription("Run lint incremental for all variants")
} else {
setDescription("Run lint incremental for $flavor$buildType build.")
}
}
String originTaskName = getOriginTaskName(flavor, buildType)//lint
Set<Task> originTasks = project.getTasksByName(originTaskName, false)
Task originTask = null
if (originTasks != null && originTasks.size() > 0) originTask = originTasks[0]
if (originTask == null) {
project.tasks.whenTaskAdded { task ->
if (task.name == originTaskName) {
if (incrementalLint) addIncrementalAndReport(project, task, inputFiles, outputFile)
}
}
} else {
if (incrementalLint) addIncrementalAndReport(project, originTask, inputFiles, outputFile) //where change file?
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.